Skip to content

Commit

Permalink
Merge pull request #5666 from neirbowj/numpy_regression
Browse files Browse the repository at this point in the history
BUG: Work-around a numpy regression affecting pandas.eval() with numexpr
  • Loading branch information
jreback committed Dec 9, 2013
2 parents 91cad62 + ba3fbb8 commit b3e25a0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
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 @@ -251,6 +251,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

0 comments on commit b3e25a0

Please sign in to comment.