We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent dc0db65 commit cfd2005Copy full SHA for cfd2005
pandas/src/tseries.pyx
@@ -107,20 +107,17 @@ def ismember(ndarray arr, set values):
107
'''
108
cdef:
109
Py_ssize_t i, n
110
- flatiter it
111
ndarray[uint8_t] result
112
object val
113
114
- it = <flatiter> PyArray_IterNew(arr)
115
n = len(arr)
116
result = np.empty(n, dtype=np.uint8)
117
for i in range(n):
118
- val = PyArray_GETITEM(arr, PyArray_ITER_DATA(it))
+ val = util.get_value_at(arr, i)
119
if val in values:
120
result[i] = 1
121
else:
122
result[i] = 0
123
- PyArray_ITER_NEXT(it)
124
125
return result.view(np.bool_)
126
0 commit comments