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

Method diag

ot/backend.py:702–710  ·  view source on GitHub ↗

r""" Extracts or constructs a diagonal tensor. This function follows the api from :any:`numpy.diag` See: https://numpy.org/doc/stable/reference/generated/numpy.diag.html

(self, a, k=0)

Source from the content-addressed store, hash-verified

700 raise NotImplementedError()
701
702 def diag(self, a, k=0):
703 r"""
704 Extracts or constructs a diagonal tensor.
705
706 This function follows the api from :any:`numpy.diag`
707
708 See: https://numpy.org/doc/stable/reference/generated/numpy.diag.html
709 """
710 raise NotImplementedError()
711
712 def unique(self, a, return_inverse=False):
713 r"""

Callers 15

test_empty_backendFunction · 0.95
lowrank_sinkhornFunction · 0.45
laplacianFunction · 0.45
proj_SDPFunction · 0.45
diagMethod · 0.45
diagMethod · 0.45
diagMethod · 0.45
diagMethod · 0.45
diagMethod · 0.45
VpiFunction · 0.45

Calls

no outgoing calls

Tested by 10

test_empty_backendFunction · 0.76
test_ewcaFunction · 0.36
test_func_backendsFunction · 0.36
test_kernelFunction · 0.36
test_proj_SDPFunction · 0.36
test_lowrank_sinkhornFunction · 0.36
test_dist_bures_squaredFunction · 0.36
test_gmm_ot_planFunction · 0.36