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

Method tocsr

ot/backend.py:2292–2294  ·  view source on GitHub ↗
(self, a)

Source from the content-addressed store, hash-verified

2290 return getattr(a, "is_sparse", False) or getattr(a, "is_sparse_csr", False)
2291
2292 def tocsr(self, a):
2293 # Versions older than 1.9 do not support CSR tensors. PyTorch 1.9 and 1.10 offer a very limited support
2294 return self.todense(a)
2295
2296 def eliminate_zeros(self, a, threshold=0.0):
2297 if self.issparse(a):

Callers

nothing calls this directly

Calls 1

todenseMethod · 0.95

Tested by

no test coverage detected