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 50a985e commit 777ac2fCopy full SHA for 777ac2f
text_extensions_for_pandas/array/tensor.py
@@ -349,7 +349,12 @@ def isna(self) -> np.array:
349
for information about this method.
350
"""
351
if self._tensor.dtype.type is np.object_:
352
- return self._tensor == None
+ # Avoid comparing with __eq__ because the elements of the tensor may do
353
+ # something funny with that operation.
354
+ result_list = [
355
+ self._tensor[i] is None for i in range(len(self))
356
+ ]
357
+ return np.array(result_list, dtype=bool)
358
elif self._tensor.dtype.type is np.str_:
359
return np.all(self._tensor == "", axis=-1)
360
else:
0 commit comments