Closed pierrepaleo closed 1 year ago
Thanks, a comment was added and the individual components are checked.
numpy.prod(shape)
can still yield floating-point values, for example when shape = (1, np.uint64(2), 4)
.
So the product is computed on values cast to uint64, but not sure that's a good idea. Perhaps each component should be checked to be an int (and raise an error if a float is found).
Any thoughts ?
numpy.prod
lets you specify the output dtype:
https://numpy.org/doc/stable/reference/generated/numpy.prod.html#numpy.prod
Pushed some minor fixes. This looks good to me now. Thanks for your contribution!
Fix #659