Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/PythonOT/POT
/ laplacian
Function
laplacian
ot/utils.py:52–56 ·
view source on GitHub ↗
r"""Compute Laplacian matrix
(x)
Source
from the content-addressed store, hash-verified
50
51
52
def
laplacian(x):
53
r
""
"Compute Laplacian matrix"
""
54
nx = get_backend(x)
55
L = nx.diag(nx.sum(x, axis=0)) - x
56
return
L
57
58
59
def
list_to_array(*lst, nx=None):
Callers
1
emd_laplace
Function · 0.85
Calls
3
get_backend
Function · 0.85
diag
Method · 0.45
sum
Method · 0.45
Tested by
no test coverage detected