MCPcopy
hub / github.com/dask/dask / sum

Function sum

dask/array/reductions.py:70–83  ·  view source on GitHub ↗
(a, axis=None, dtype=None, keepdims=False, split_every=None, out=None)

Source from the content-addressed store, hash-verified

68
69@derived_from(np)
70def sum(a, axis=None, dtype=None, keepdims=False, split_every=None, out=None):
71 if dtype is None:
72 dtype = getattr(np.zeros(1, dtype=a.dtype).sum(), "dtype", object)
73 result = reduction(
74 a,
75 chunk.sum,
76 chunk.sum,
77 axis=axis,
78 keepdims=keepdims,
79 dtype=dtype,
80 split_every=split_every,
81 out=out,
82 )
83 return result
84
85
86@derived_from(np)

Callers 15

dotmanyFunction · 0.90
__len__Method · 0.90
sumMethod · 0.90
normalize_chunksFunction · 0.90
common_blockdimFunction · 0.90
unify_chunksFunction · 0.90
concatenateFunction · 0.90
_vindex_mergeFunction · 0.90
to_npy_stackFunction · 0.90
__getitem__Method · 0.90

Calls 3

reductionFunction · 0.90
sumMethod · 0.45
zerosMethod · 0.45

Tested by 12

funcFunction · 0.40
funcFunction · 0.40
fooFunction · 0.40
test_auto_chunksFunction · 0.40
test_gradientFunction · 0.40
fooFunction · 0.40
test_fuse_rootsFunction · 0.40