I\'d like to multiply an int16 array but a float array, with auto rounding, but this fails :
int16
float
import numpy A = numpy.array([1, 2, 3
2 ways to solve this:
You can solve this by replacing
A *= B
with
A = (A * B)
or with
numpy.multiply(A, B, out=A, casting='unsafe')