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

Method sum

dask/array/_array_expr/_collection.py:342–361  ·  view source on GitHub ↗

Return the sum of the array elements over the given axis. Refer to :func:`dask.array.sum` for full documentation. See Also -------- dask.array.sum : equivalent function

(self, axis=None, dtype=None, keepdims=False, split_every=None, out=None)

Source from the content-addressed store, hash-verified

340 return rechunk(self, chunks, threshold, block_size_limit, balance, method)
341
342 def sum(self, axis=None, dtype=None, keepdims=False, split_every=None, out=None):
343 """
344 Return the sum of the array elements over the given axis.
345
346 Refer to :func:`dask.array.sum` for full documentation.
347
348 See Also
349 --------
350 dask.array.sum : equivalent function
351 """
352 from dask.array.reductions import sum
353
354 return sum(
355 self,
356 axis=axis,
357 dtype=dtype,
358 keepdims=keepdims,
359 split_every=split_every,
360 out=out,
361 )
362
363 def mean(self, axis=None, dtype=None, keepdims=False, split_every=None, out=None):
364 """Returns the average of the array elements along given axis.

Callers 15

test_no_chunksFunction · 0.95
runFunction · 0.45
funcFunction · 0.45
test_stack_scalarsFunction · 0.45
test_elemwise_on_scalarsFunction · 0.45
funcFunction · 0.45
test_dtypeFunction · 0.45
test_dtype_complexFunction · 0.45

Calls 1

sumFunction · 0.90

Tested by 15

test_no_chunksFunction · 0.76
runFunction · 0.36
funcFunction · 0.36
test_stack_scalarsFunction · 0.36
test_elemwise_on_scalarsFunction · 0.36
funcFunction · 0.36
test_dtypeFunction · 0.36
test_dtype_complexFunction · 0.36