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

BLD: require numpy 2.0.0 (stable) at build time #4930

Merged
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 pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ requires = [
# for the upper pin in Cython
# see https://github.com/yt-project/yt/issues/4044
"Cython>=3.0.3, <3.1",
"numpy>=2.0.0rc1",
"numpy>=2.0.0",
"ewah-bool-utils>=1.2.0",
]
build-backend = "setuptools.build_meta:__legacy__"
Expand Down
2 changes: 1 addition & 1 deletion tests/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ answer_tests:
- yt/frontends/chombo/tests/test_outputs.py:test_zp
- yt/frontends/chombo/tests/test_outputs.py:test_kho

local_enzo_009: # PR 3856
local_enzo_011: # PR 4930
- yt/frontends/enzo/tests/test_outputs.py:test_moving7
- yt/frontends/enzo/tests/test_outputs.py:test_galaxy0030
- yt/frontends/enzo/tests/test_outputs.py:test_toro1d
Expand Down
2 changes: 1 addition & 1 deletion yt/_maintenance/numpy2_compat.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@
if NUMPY_VERSION >= Version("2.0.0dev0"):
from numpy import trapezoid as trapezoid # type: ignore [attr-defined]
else:
from numpy import trapz as trapezoid # noqa: F401
from numpy import trapz as trapezoid # type: ignore [attr-defined] # noqa: F401
2 changes: 1 addition & 1 deletion yt/fields/vector_operations.py
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ def _divergence(field, data):
ds = div_fac * just_one(data["index", "dz"])
f += data[zn[0], f"relative_{zn[1]}"][1:-1, 1:-1, sl_right] / ds
f -= data[zn[0], f"relative_{zn[1]}"][1:-1, 1:-1, sl_left] / ds
new_field = data.ds.arr(np.zeros(data[xn].shape, dtype=np.float64), f.units)
new_field = data.ds.arr(np.zeros(data[xn].shape, dtype="f8"), str(f.units))
new_field[1:-1, 1:-1, 1:-1] = f
return new_field

Expand Down
Loading