cupy.nansum#

cupy.nansum(a, axis=None, dtype=None, out=None, keepdims=False)[source]#

Returns the sum of an array along given axes treating Not a Numbers (NaNs) as zero.

Parameters:
  • a (cupy.ndarray) – Array to take sum.

  • axis (int or sequence of ints) – Axes along which the sum is taken.

  • dtype – Data type specifier.

  • out (cupy.ndarray) – Output array.

  • keepdims (bool) – If True, the specified axes are remained as axes of length one.

Returns:

The result array.

Return type:

cupy.ndarray

See also

numpy.nansum()