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

Method eliminate_zeros

ot/backend.py:822–830  ·  view source on GitHub ↗

r""" Removes entries smaller than the given threshold from the sparse tensor. This function follows the api from :any:`scipy.sparse.csr_matrix.eliminate_zeros` See: https://docs.scipy.org/doc/scipy-0.14.0/reference/generated/scipy.sparse.csr_matrix.eliminate_zeros.html

(self, a, threshold=0.0)

Source from the content-addressed store, hash-verified

820 raise NotImplementedError()
821
822 def eliminate_zeros(self, a, threshold=0.0):
823 r"""
824 Removes entries smaller than the given threshold from the sparse tensor.
825
826 This function follows the api from :any:`scipy.sparse.csr_matrix.eliminate_zeros`
827
828 See: https://docs.scipy.org/doc/scipy-0.14.0/reference/generated/scipy.sparse.csr_matrix.eliminate_zeros.html
829 """
830 raise NotImplementedError()
831
832 def todense(self, a):
833 r"""

Callers 5

test_empty_backendFunction · 0.95
eliminate_zerosMethod · 0.45
eliminate_zerosMethod · 0.45
test_func_backendsFunction · 0.45

Calls

no outgoing calls

Tested by 2

test_empty_backendFunction · 0.76
test_func_backendsFunction · 0.36