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

COMPAT: numpy 1.13 test compat #16654

Merged
merged 2 commits into from
Jun 10, 2017
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
2 changes: 1 addition & 1 deletion ci/requirements-3.6_DOC.build
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
python=3.6*
python-dateutil
pytz
numpy
numpy=1.12*
cython
3 changes: 3 additions & 0 deletions pandas/compat/numpy/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
_np_version_under1p11 = _nlv < '1.11'
_np_version_under1p12 = _nlv < '1.12'
_np_version_under1p13 = _nlv < '1.13'
_np_version_under1p14 = _nlv < '1.14'

if _nlv < '1.7.0':
raise ImportError('this version of pandas is incompatible with '
Expand Down Expand Up @@ -74,4 +75,6 @@ def np_array_datetime64_compat(arr, *args, **kwargs):
'_np_version_under1p10',
'_np_version_under1p11',
'_np_version_under1p12',
'_np_version_under1p13',
'_np_version_under1p14'
]
6 changes: 5 additions & 1 deletion pandas/tests/test_expressions.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

from pandas.core.api import DataFrame, Panel
from pandas.core.computation import expressions as expr
from pandas import compat, _np_version_under1p11
from pandas import compat, _np_version_under1p11, _np_version_under1p13
from pandas.util.testing import (assert_almost_equal, assert_series_equal,
assert_frame_equal, assert_panel_equal,
assert_panel4d_equal, slow)
Expand Down Expand Up @@ -420,6 +420,10 @@ def test_bool_ops_warn_on_arithmetic(self):
f = getattr(operator, name)
fe = getattr(operator, sub_funcs[subs[op]])

# >= 1.13.0 these are now TypeErrors
if op == '-' and not _np_version_under1p13:
continue

with tm.use_numexpr(True, min_elements=5):
with tm.assert_produces_warning(check_stacklevel=False):
r = f(df, df)
Expand Down