MCPcopy Create free account
hub / github.com/PythonOT/POT / sum

Method sum

ot/backend.py:353–361  ·  view source on GitHub ↗

r""" Sums tensor elements over given dimensions. This function follows the api from :any:`numpy.sum` See: https://numpy.org/doc/stable/reference/generated/numpy.sum.html

(self, a, axis=None, keepdims=False)

Source from the content-addressed store, hash-verified

351 raise NotImplementedError()
352
353 def sum(self, a, axis=None, keepdims=False):
354 r"""
355 Sums tensor elements over given dimensions.
356
357 This function follows the api from :any:`numpy.sum`
358
359 See: https://numpy.org/doc/stable/reference/generated/numpy.sum.html
360 """
361 raise NotImplementedError()
362
363 def cumsum(self, a, axis=None):
364 r"""

Callers 15

test_empty_backendFunction · 0.95
_init_lr_sinkhornFunction · 0.45
_LR_DysktraFunction · 0.45
lowrank_sinkhornFunction · 0.45
line_search_armijoFunction · 0.45
costFunction · 0.45
lp_solverFunction · 0.45
laplacianFunction · 0.45
proj_simplexFunction · 0.45
distFunction · 0.45

Calls

no outgoing calls

Tested by 15

test_empty_backendFunction · 0.76
test_partial_wassersteinFunction · 0.36
fFunction · 0.36
test_cootFunction · 0.36
test_entropic_cootFunction · 0.36
test_coot_warmstartFunction · 0.36
fFunction · 0.36
fbFunction · 0.36