Skip to content

Commit

Permalink
Replace np.product with np.prod
Browse files Browse the repository at this point in the history
  • Loading branch information
dpgrote committed Dec 3, 2024
1 parent 0905d0b commit 6a72ef2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Tools/PostProcessing/read_raw_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ def _read_field(raw_file, field_name):
f.seek(offset)
if header.version == 1:
f.readline() # skip the first line
arr = np.fromfile(f, "float64", np.product(shape))
arr = np.fromfile(f, "float64", np.prod(shape))
arr = arr.reshape(shape, order="F")
box_shape = [slice(low, hig + 1) for low, hig in zip(lo, hi)]
if header.ncomp > 1:
Expand All @@ -225,7 +225,7 @@ def _read_buffer(snapshot, header_fn, _component_names):
lo = box[0] - dom_lo
hi = box[1] - dom_lo
shape = hi - lo + 1
size = np.product(shape)
size = np.prod(shape)
with open(snapshot + "/Level_0/" + fn, "rb") as f:
f.seek(offset)
if header.version == 1:
Expand Down

0 comments on commit 6a72ef2

Please sign in to comment.