Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/PythonOT/POT
/ test_to_numpy
Function
test_to_numpy
test/test_backend.py:25–33 ·
view source on GitHub ↗
(nx)
Source
from the content-addressed store, hash-verified
23
24
25
def
test_to_numpy(nx):
26
v = nx.zeros(10)
27
M = nx.ones((10, 10))
28
29
v2 = to_numpy(v)
30
assert isinstance(v2, np.ndarray)
31
32
v2, M2 = to_numpy(v, M)
33
assert isinstance(M2, np.ndarray)
34
35
36
def
test_get_backend_invalid():
Callers
nothing calls this directly
Calls
3
to_numpy
Function · 0.90
zeros
Method · 0.45
ones
Method · 0.45
Tested by
no test coverage detected