Skip to content

Commit

Permalink
numpy 2.0 deprec of np.prod
Browse files Browse the repository at this point in the history
  • Loading branch information
cbyrohl committed Aug 21, 2024
1 parent 35442aa commit 38fa188
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/scida/customs/arepo/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -1531,7 +1531,7 @@ def map_group_operation(
# TODO: very messy and inefficient routine. improve some time.
# TODO: Set entry_bytes_out
nbytes_dtype_out = 4 # TODO: hardcode 4 byte output dtype as estimate for now
entry_nbytes_out = nbytes_dtype_out * np.product(shape)
entry_nbytes_out = nbytes_dtype_out * np.prod(shape)

# list_chunkedges refers to bounds of index intervals to be processed together
# if idxlist is specified, then these indices do not have to refer to group indices.
Expand Down
2 changes: 1 addition & 1 deletion tests/test_simulation_units.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def test_simulation_tng50(testdatapath):
# Compare dark matter mass
cosmology: FlatLambdaCDM = snp.cosmology
ureg = snp.unitregistry
vol = np.product(snp.boxsize) / cosmology.h**3 * ureg.kpc**3
vol = np.prod(snp.boxsize) / cosmology.h**3 * ureg.kpc**3
dens = (cosmology.Om0 - cosmology.Ob0) * cosmology.critical_density0
dens = dens.value * ureg(dens.unit.to_string("ogip"))
boxmass = vol * dens
Expand Down

0 comments on commit 38fa188

Please sign in to comment.