Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想使用 numexpr (2.7) 检查 Numpy 字符串数组的每个元素是否包含给定的字符串。我已经写了:
x = np.array(['abc', 'cde']) ne.evaluate("contains(x, 'a')")
我得到:ValueError: unknown type str96
ValueError: unknown type str96
我还尝试指定一个具有相同结果的dtypeforx
dtype
x