File tree Expand file tree Collapse file tree 3 files changed +26
-4
lines changed Expand file tree Collapse file tree 3 files changed +26
-4
lines changed Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ permissions:
77
88jobs :
99 build_wheels :
10- name : Build wheels on ${{ matrix.os }} for ${{ matrix.arch }}
10+ name : Build and test on ${{ matrix.os }}${{ matrix.numpy-version && format(' (numpy {0})', matrix.numpy-version) || '' }} for ${{ matrix.arch }}
1111 runs-on : ${{ matrix.runs-on || matrix.os }}
1212 permissions :
1313 contents : write
2424 arch : x86_64
2525 artifact_name : " linux-x86_64"
2626
27+ # Linux x86_64 with numpy 1.23
28+ - os : ubuntu-latest
29+ arch : x86_64
30+ artifact_name : " linux-x86_64_numpy1_23"
31+ numpy-version : " 1.26"
32+
2733 # Linux ARM64 builds (native runners)
2834 - os : ubuntu-24.04-arm
2935 arch : aarch64
4450 - uses : actions/setup-python@v3
4551 name : Install Python
4652 with :
47- python-version : ' 3.x'
53+ python-version : ' 3.12'
54+
55+ - name : Install specific numpy version
56+ if : matrix.numpy-version
57+ run : pip install "numpy==${{ matrix.numpy-version }}.*"
58+
59+ - name : Local Build
60+ run : pip install -e .
61+
62+ - name : Test
63+ run : |
64+ pip install pytest
65+ python -m pytest
4866
4967 - name : Build wheels
5068 uses : pypa/cibuildwheel@v3.1.3
Original file line number Diff line number Diff line change @@ -963,7 +963,11 @@ def test_expressions(
963963 # "overflows" or "divide by zero" in plain eval().
964964 warnings .simplefilter ("ignore" )
965965 try :
966- npval = eval (expr , globals (), locals ())
966+ npexpr = expr
967+ if "sign" in expr and dtype == complex and np .__version__ < "2.0" :
968+ #definition of sign changed in numpy 2.0 for complex numbers
969+ npexpr = expr .replace ("sign(b+c)" , "(b+c)/abs(b+c)" )
970+ npval = eval (npexpr , globals (), locals ())
967971 except Exception as ex :
968972 np_exception = ex
969973 npval = None
Original file line number Diff line number Diff line change 1- numpy >= 1.23 .0 # keep in sync with NPY_TARGET_VERSION (setup.py)
1+ numpy >= 1.26 .0 # keep in sync with NPY_TARGET_VERSION (setup.py)
You can’t perform that action at this time.
0 commit comments