I am trying to perform an element wise multiplication of numerous numpy arrays.
The implementation:-
mult = np.ones(len(single_arrays[0]))
for i in range(len(single_arrays)):
mult *= single_arrays[i]
Most values in the each of the single arrays is between 0 and 1(some values are above 1), and the 2D "single_arrays" has about 700 individual arrays.
The resultant array "mult" has a lot of "inf" values and one "nan" value even though no array in the "single_arrays" has "inf" or "nan" values, all the values are valid floating points.
Why is this issue arising in mult ? Some values are very small in the array, going to tens and thousandths decimal places, could underflow or overflow be an issue here ?