Skip to content
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

BUG: Work-around a numpy regression affecting pandas.eval() with numexpr #5666

Merged
merged 2 commits into from
Dec 9, 2013
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions doc/source/release.rst
Original file line number Diff line number Diff line change
Expand Up @@ -820,6 +820,7 @@ Bug Fixes
- Bug fix in apply when using custom function and objects are not mutated (:issue:`5545`)
- Bug in selecting from a non-unique index with ``loc`` (:issue:`5553`)
- Bug in groupby returning non-consistent types when user function returns a ``None``, (:issue:`5592`)
- Work around regression in numpy 1.7.0 which erroneously raises IndexError from ``ndarray.item`` (:issue:`5666`)

pandas 0.12.0
-------------
Expand Down
5 changes: 4 additions & 1 deletion pandas/computation/align.py
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,9 @@ def _reconstruct_object(typ, obj, axes, dtype):

try:
ret = ret_value.item()
except ValueError:
except (ValueError, IndexError):
# XXX: we catch IndexError to absorb a
# regression in numpy 1.7.0
# fixed by numpy/numpy@04b89c63
ret = ret_value
return ret