Divide (element-wise) one Numpy array of dtype float by another, suppressing warnings about division by 0.0. Raises a ValueError in case there is any 0.0 in the denominator whose corresponding value in the numerator is not also 0.0. Converts all NaNs resulting from 0.0/0.0 operations to 0.0.
>>> n = np.zeros((2,2), dtype=float)
>>> d = np.zeros((2,2), dtype=float)
>>> r = safely_divide_float_array(n,d)
>>> r
array([[ 0., 0.],
[ 0., 0.]])
>>> n[0,0] = 1.0
>>> r = safely_divide_float_array(n,d)
Traceback (most recent call last):
...
ValueError: Unable to safely divide; denominator array has a 0.0 where numerator array has a non-zero value
>>> d[0,0] = 10.0
>>> r = safely_divide_float_array(n,d)
>>> r
array([[ 0.1, 0. ],
[ 0. , 0. ]])