Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
robbmcleod committed Sep 8, 2023
2 parents 6617a65 + 8ce59b6 commit d1908b8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pyfastnoisesimd/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ def aligned_chunks(array, n_chunks, axis=0):
"""
block_size = 1
if array.ndim > axis + 1:
block_size = np.product(array.shape[axis:])
block_size = np.prod(array.shape[axis:])
# print(f'Got blocksize of {block_size}')

vect_len = max(ext.SIMD_ALIGNMENT // array.dtype.itemsize, 1)
Expand Down Expand Up @@ -775,7 +775,7 @@ def genAsGrid(self, shape=[1,1024,1024], start=[0,0,0]) -> np.ndarray:
shape = (shape,)

# There is a minimum array size before we bother to turn on futures.
size = np.product(shape)
size = np.prod(shape)
# size needs to be evenly divisible by ext.SIMD_ALINGMENT
if np.remainder(size, ext.SIMD_ALIGNMENT/np.dtype(np.float32).itemsize) != 0.0:
raise ValueError('The size of the array (in bytes) must be evenly divisible by the SIMD vector length')
Expand Down

0 comments on commit d1908b8

Please sign in to comment.