scipp.nansum#

scipp.nansum(x, dim=None, *, out=None)#

Element-wise sum over the specified dimension; NaNs ignored.

See scipp.sum() on how rounding errors for float32 inputs are handled.

Parameters
Raises

If the dimension does not exist, or the dtype cannot be summed, e.g., if it is a string.

Returns

Union[Variable, DataArray, Dataset] – The sum of the input values with NaNs set to zero.

Seealso

scipp.sum().