Skip to content

Commit 10725f7

Browse files
Merge pull request #283 from vdbma/FixIdfxIO
Update to numpy 2+
2 parents 0b79b28 + 6c95183 commit 10725f7

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

.pre-commit-config.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ repos:
3333
- F # pyflakes
3434
- B # flake8-bugbear
3535
- I # isort
36+
- NPY # numpy-specific rules
3637

3738
- repo: https://github.com/neutrinoceros/inifix
3839
rev: v5.0.2

pytools/idfx_io.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def __init__(self, fh, byteorder="little"):
2929
dims = []
3030
for dim in range(self.ndims):
3131
dims.append(int.from_bytes(fh.read(INT_SIZE), byteorder))
32-
ntot = int(np.product(dims))
32+
ntot = int(np.prod(dims))
3333
raw = struct.unpack(str(ntot) + "d", fh.read(DOUBLE_SIZE * ntot))
3434
self.array = np.asarray(raw).reshape(dims[::-1])
3535

0 commit comments

Comments
 (0)