np_divide_a_by_b

paminco.utils.math.np_divide_a_by_b(a, b, default_value: float = 0.0, cast_to_numpy: bool = False) numpy.ndarray[source]

Safely divide a by b.

Parameters
andarray

Numerator

bndarray

Denominator.

default_valuefloat, default=0.0

Fill value where b equals 0.

Returns
resndarray

a / b filled with default_value where b == 0.

See also

numpy.divide