Skip to content

Commit

Permalink
[compatibility]: change numpy product to prod as this changed in nump…
Browse files Browse the repository at this point in the history
…y 2.0
  • Loading branch information
mscaudill committed Dec 6, 2024
1 parent 9e8c62b commit 5d16e62
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/openseize/core/resources.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def assignable(shape: Tuple,
"""

limit = psutil.virtual_memory().available if not limit else limit
required = np.product(shape) * np.dtype(dtype).itemsize
required = np.prod(shape) * np.dtype(dtype).itemsize

tolerance = int(50e6) # ensure required is at least 50MB below tolerance
if required < limit - tolerance:
Expand Down

0 comments on commit 5d16e62

Please sign in to comment.