Skip to content

Commit 93a1e7e

Browse files
committed
Make numpy version requirements stricter to avoid numpy2.0 which has major changes. Future work will try to enable numpy2.0 and greater
1 parent 3362b02 commit 93a1e7e

8 files changed

+13
-16
lines changed

.github/workflows/continuous-integration-workflow-conda.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ jobs:
4545
- name: Setup PyApprox
4646
shell: bash -l {0}
4747
run: |
48-
pip install -e .
48+
python -m pip install -e .
4949
- name: Test PyApprox
5050
shell: bash -l {0}
5151
run: |

.github/workflows/continuous-integration-workflow-docs-pip.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
- name: Setup PyApprox Documentation
3838
shell: bash -l {0}
3939
run: |
40-
pip install -e .[docs]
40+
python -m pip install -e .[docs]
4141
- name: Create PyApprox Documentation
4242
shell: bash -l {0}
4343
run: |

.github/workflows/continuous-integration-workflow-docs.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,11 @@ jobs:
4343
- name: Setup PyApprox
4444
shell: bash -l {0}
4545
run: |
46-
pip install -e . --no-build-isolation
46+
python -m pip install -e . --no-build-isolation
4747
- name: Setup PyApprox Documentation
4848
shell: bash -l {0}
4949
run: |
50-
pip install -e .[docs]
50+
python -m pip install -e .[docs]
5151
- name: Create PyApprox Documentation
5252
shell: bash -l {0}
5353
run: |

.github/workflows/continuous-integration-workflow-pip.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ jobs:
4040
python -m pip install --upgrade pip
4141
- name: Setup PyApprox
4242
run: |
43-
pip install -e .
43+
python -m pip install -e .
4444
- name: Test PyApprox
4545
run: |
4646
pytest -s --cov-report term --cov=pyapprox

environment.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ channels:
33
- defaults
44
- conda-forge
55
dependencies:
6-
- python>=3.8
7-
- numpy>=1.20
6+
- python>=3.9
7+
- numpy>=1.20,<=1.26.4
88
- matplotlib
99
- scipy
1010
- jupyter

pyproject.toml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ requires = [
44
"setuptools",
55
"wheel",
66
"Cython",
7-
"numpy>=1.16.4",
7+
"numpy>=1.20, <=1.26.4",
88
"scipy>=1.0.0",
99
]
1010

@@ -27,8 +27,7 @@ classifiers=[
2727
"Operating System :: OS Independent",
2828
]
2929
dependencies = [
30-
'setuptools',
31-
'numpy >= 1.16.4',
30+
'numpy >= 1.20, <=1.26.4',
3231
'matplotlib',
3332
'scipy >= 1.0.0',
3433
'Cython',

setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,10 @@ def no_cythonize(extensions, **_ignore):
4848
"Operating System :: OS Independent",
4949
],
5050
include_dirs=[np.get_include()],
51-
setup_requires=['setuptools', 'numpy >= 1.16.4', 'Cython',
51+
setup_requires=['setuptools', 'numpy >= 1.20, <=1.26.4', 'Cython',
5252
'scipy >= 1.0.0'],
5353
install_requires=[
54-
'numpy >= 1.16.4',
54+
'numpy >= 1.20, <=1.26.4',
5555
'matplotlib',
5656
'scipy >= 1.0.0',
5757
'Cython',

tutorials/multi_fidelity/plot_ensemble_selection.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,7 @@
111111
ax = plt.subplots(1, 1, figsize=(8, 6))[1]
112112
_ = multifidelity.plot_estimator_variance_reductions(
113113
best_ests, est_labels, ax)
114-
ax.set_xlabel(mathrm_label("Low fidelity models"))
115-
plt.show()
114+
_ = ax.set_xlabel(mathrm_label("Low fidelity models"))
116115

117116
#%%
118117
#Find the best estimator
@@ -156,5 +155,4 @@
156155
ax = plt.subplots(1, 1, figsize=(8, 6))[1]
157156
_ = multifidelity.plot_estimator_variance_reductions(
158157
best_ests, est_labels, ax)
159-
ax.set_xlabel(mathrm_label("Estimator types"))
160-
plt.show()
158+
_ = ax.set_xlabel(mathrm_label("Estimator types"))

0 commit comments

Comments
 (0)