Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/PythonOT/POT
/ diag
Method
diag
ot/backend.py:2201–2202 ·
view source on GitHub ↗
(self, a, k=0)
Source
from the content-addressed store, hash-verified
2199
return
X.T, Y.T
2200
2201
def
diag(self, a, k=0):
2202
return
torch.diag(a, diagonal=k)
2203
2204
def
unique(self, a, return_inverse=False):
2205
return
torch.unique(a, return_inverse=return_inverse)
Callers
nothing calls this directly
Calls
1
diag
Method · 0.45
Tested by
no test coverage detected