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

Function getitem

test/test_utils.py:50–51  ·  view source on GitHub ↗
(i, j, a, b)

Source from the content-addressed store, hash-verified

48 a, b = nx.from_numpy(a, b)
49
50 def getitem(i, j, a, b):
51 return a[i, None] * b[None, j]
52
53 # create a lazy tensor
54 T = ot.utils.LazyTensor((n1, n2), getitem, a=a, b=b)

Callers

nothing calls this directly

Calls 1

dotMethod · 0.45

Tested by

no test coverage detected