MCPcopy
hub / github.com/pydata/xarray / count

Function count

xarray/core/duck_array_ops.py:391–394  ·  view source on GitHub ↗

Count the number of non-NA in this array along the given axis or axes

(data, axis=None)

Source from the content-addressed store, hash-verified

389
390
391def count(data, axis=None):
392 """Count the number of non-NA in this array along the given axis or axes"""
393 xp = get_array_namespace(data)
394 return xp.sum(xp.logical_not(isnull(data)), axis=axis)
395
396
397def sum_where(data, axis=None, dtype=None, where=None):

Callers 4

_nan_argminmax_objectFunction · 0.90
_nan_minmax_objectFunction · 0.90
_nanmean_ddof_objectFunction · 0.90
test_countMethod · 0.90

Calls 3

get_array_namespaceFunction · 0.90
isnullFunction · 0.85
sumMethod · 0.45

Tested by 1

test_countMethod · 0.72

Used in the wild real call sites across dependent graphs

searching dependent graphs…