Skip to content

Commit

Permalink
Merge pull request #4930 from neutrinoceros/bld/build_against_stable_…
Browse files Browse the repository at this point in the history
…numpy
  • Loading branch information
neutrinoceros authored Jun 25, 2024
2 parents 7f0f4b9 + 73a1672 commit 9634be1
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
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

0 comments on commit 9634be1

Please sign in to comment.