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

Function f

test/test_da.py:978–984  ·  view source on GitHub ↗
(G)

Source from the content-addressed store, hash-verified

976 lstlab = nx.unique(labels_a)
977
978 def f(G):
979 res = 0
980 for i in range(G.shape[1]):
981 for lab in lstlab:
982 temp = G[labels_a == lab, i]
983 res += nx.norm(temp)
984 return res
985
986 def df(G):
987 W = nx.zeros(G.shape, type_as=G)

Callers 1

Calls 1

normMethod · 0.45

Tested by

no test coverage detected