bundles / numpy latest / numpy / lib / _nanfunctions_impl / _divide_by_count
function
numpy.lib._nanfunctions_impl:_divide_by_count
source: build-install/usr/lib/python3.14/site-packages/numpy/lib/_nanfunctions_impl.py :204
Signature
def _divide_by_count ( a , b , out = None ) Summary
Compute a/b ignoring invalid results. If a is an array the division is done in place. If a is a scalar, then its type is preserved in the output. If out is None, then a is used instead so that the division is in place. Note that this is only called with a an inexact type.
Parameters
a: {ndarray, numpy scalar}Numerator. Expected to be of inexact type but not checked.
b: {ndarray, numpy scalar}Denominator.
out: ndarray, optionalAlternate output array in which to place the result. The default is
None; if provided, it must have the same shape as the expected output, but the type will be cast if necessary.
Returns
ret: {ndarray, numpy scalar}The return value is a/b. If
awas an ndarray the division is done in place. Ifais a numpy scalar, the division preserves its type.
Aliases
-
numpy.lib._nanfunctions_impl._divide_by_count