diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 3d351a7c..726f0045 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -33,6 +33,7 @@ repos: - F # pyflakes - B # flake8-bugbear - I # isort + - NPY # numpy-specific rules - repo: https://github.com/neutrinoceros/inifix rev: v5.0.2 diff --git a/pytools/idfx_io.py b/pytools/idfx_io.py index 480e713d..17dc6272 100644 --- a/pytools/idfx_io.py +++ b/pytools/idfx_io.py @@ -29,7 +29,7 @@ def __init__(self, fh, byteorder="little"): dims = [] for dim in range(self.ndims): dims.append(int.from_bytes(fh.read(INT_SIZE), byteorder)) - ntot = int(np.product(dims)) + ntot = int(np.prod(dims)) raw = struct.unpack(str(ntot) + "d", fh.read(DOUBLE_SIZE * ntot)) self.array = np.asarray(raw).reshape(dims[::-1])