8000 Assorted _libs cleanups by jbrockmendel · Pull Request #19887 · pandas-dev/pandas · GitHub
[go: up one dir, main page]

Skip to content

Assorted _libs cleanups #19887

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
Feb 28, 2018
Prev Previous commit
Next Next commit
fixup cut/paste
  • Loading branch information
jbrockmendel committed Feb 24, 2018
commit 933dfa7bd411a039c39ab676812fa5cde87201b2
6 changes: 3 additions & 3 deletions pandas/_libs/lib.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -123,10 +123,10 @@ def item_from_zerodim(object val):
array([1])

"""
if cnp.PyArray_IsZeroDim(arr):
return cnp.PyArray_ToScalar(cnp.PyArray_DATA(arr), arr)
if cnp.PyArray_IsZeroDim(val):
return cnp.PyArray_ToScalar(cnp.PyArray_DATA(val), val)
else:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just return

return arr
return val


@cython.wraparound(False)
Expand Down
0