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

Method trace

ot/backend.py:932–940  ·  view source on GitHub ↗

r""" Returns the sum along diagonals of the array. This function follows the api from :any:`numpy.trace`. See: https://numpy.org/doc/stable/reference/generated/numpy.trace.html

(self, a)

Source from the content-addressed store, hash-verified

930 raise NotImplementedError()
931
932 def trace(self, a):
933 r"""
934 Returns the sum along diagonals of the array.
935
936 This function follows the api from :any:`numpy.trace`.
937
938 See: https://numpy.org/doc/stable/reference/generated/numpy.trace.html
939 """
940 raise NotImplementedError()
941
942 def inv(self, a):
943 r"""

Callers 9

test_empty_backendFunction · 0.95
bures_distanceFunction · 0.45
lossFunction · 0.45
traceMethod · 0.45
traceMethod · 0.45
fFunction · 0.45
test_func_backendsFunction · 0.45

Calls

no outgoing calls

Tested by 2

test_empty_backendFunction · 0.76
test_func_backendsFunction · 0.36