Skip to content

Commit 1696c0f

Browse files
authored
Pin numpy to get ci back to green (#45179)
1 parent a2aa477 commit 1696c0f

File tree

4 files changed

+12
-3
lines changed

4 files changed

+12
-3
lines changed

environment.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ channels:
33
- conda-forge
44
dependencies:
55
# required
6-
- numpy>=1.18.5
6+
- numpy>=1.18.5, <1.22.0
77
- python=3.8
88
- python-dateutil>=2.8.1
99
- pytz

pandas/compat/numpy/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
np_version_under1p19 = _nlv < Version("1.19")
1010
np_version_under1p20 = _nlv < Version("1.20")
1111
np_version_under1p22 = _nlv < Version("1.22")
12+
np_version_is1p22 = _nlv == Version("1.22")
1213
is_numpy_dev = _nlv.dev is not None
1314
_min_numpy_ver = "1.18.5"
1415

pandas/tests/frame/test_ufunc.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import numpy as np
44
import pytest
55

6+
from pandas.compat.numpy import np_version_is1p22
67
import pandas.util._test_decorators as td
78

89
import pandas as pd
@@ -252,7 +253,7 @@ def test_alignment_deprecation():
252253

253254

254255
@td.skip_if_no("numba")
255-
def test_alignment_deprecation_many_inputs():
256+
def test_alignment_deprecation_many_inputs(request):
256257
# https://github.com/pandas-dev/pandas/issues/39184
257258
# test that the deprecation also works with > 2 inputs -> using a numba
258259
# written ufunc for this because numpy itself doesn't have such ufuncs
@@ -261,6 +262,13 @@ def test_alignment_deprecation_many_inputs():
261262
vectorize,
262263
)
263264

265+
if np_version_is1p22:
266+
mark = pytest.mark.xfail(
267+
reason="ufunc 'my_ufunc' did not contain a loop with signature matching "
268+
"types",
269+
)
270+
request.node.add_marker(mark)
271+
264272
@vectorize([float64(float64, float64, float64)])
265273
def my_ufunc(x, y, z):
266274
return x + y + z

requirements-dev.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# This file is auto-generated from environment.yml, do not modify.
22
# See that file for comments about the need/usage of each dependency.
33

4-
numpy>=1.18.5
4+
numpy>=1.18.5, <1.22.0
55
python-dateutil>=2.8.1
66
pytz
77
asv

0 commit comments

Comments
 (0)