Skip to content

Commit dc716b0

Browse files
authored
COMPAT: numpy 1.13 test compat (pandas-dev#16654)
* COMPAT: numpy 1.13 test compat * CI: fix doc build to 1.12
1 parent ec6bf6d commit dc716b0

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

ci/requirements-3.6_DOC.build

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
python=3.6*
22
python-dateutil
33
pytz
4-
numpy
4+
numpy=1.12*
55
cython

pandas/compat/numpy/__init__.py

+3
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
_np_version_under1p11 = _nlv < '1.11'
1616
_np_version_under1p12 = _nlv < '1.12'
1717
_np_version_under1p13 = _nlv < '1.13'
18+
_np_version_under1p14 = _nlv < '1.14'
1819

1920
if _nlv < '1.7.0':
2021
raise ImportError('this version of pandas is incompatible with '
@@ -74,4 +75,6 @@ def np_array_datetime64_compat(arr, *args, **kwargs):
7475
'_np_version_under1p10',
7576
'_np_version_under1p11',
7677
'_np_version_under1p12',
78+
'_np_version_under1p13',
79+
'_np_version_under1p14'
7780
]

pandas/tests/test_expressions.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
from pandas.core.api import DataFrame, Panel
1515
from pandas.core.computation import expressions as expr
16-
from pandas import compat, _np_version_under1p11
16+
from pandas import compat, _np_version_under1p11, _np_version_under1p13
1717
from pandas.util.testing import (assert_almost_equal, assert_series_equal,
1818
assert_frame_equal, assert_panel_equal,
1919
assert_panel4d_equal, slow)
@@ -420,6 +420,10 @@ def test_bool_ops_warn_on_arithmetic(self):
420420
f = getattr(operator, name)
421421
fe = getattr(operator, sub_funcs[subs[op]])
422422

423+
# >= 1.13.0 these are now TypeErrors
424+
if op == '-' and not _np_version_under1p13:
425+
continue
426+
423427
with tm.use_numexpr(True, min_elements=5):
424428
with tm.assert_produces_warning(check_stacklevel=False):
425429
r = f(df, df)

0 commit comments

Comments
 (0)