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 9f66b81 commit be47b86Copy full SHA for be47b86
pandas/_libs/lib.pyx
@@ -322,7 +322,7 @@ def item_from_zerodim(val: object) -> object:
322
>>> item_from_zerodim(np.array([1]))
323
array([1])
324
"""
325
- if cnp.PyArray_IsZeroDim(val):
+ if cnp.PyArray_IsZeroDim(val) and cnp.PyArray_CheckExact(val):
326
return cnp.PyArray_ToScalar(cnp.PyArray_DATA(val), val)
327
return val
328
0 commit comments