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

Method _convert_to_index_for_coo

ot/backend.py:3156–3160  ·  view source on GitHub ↗
(self, tensor)

Source from the content-addressed store, hash-verified

3154 )
3155
3156 def _convert_to_index_for_coo(self, tensor):
3157 if isinstance(tensor, self.__type__):
3158 return int(self.max(tensor)) + 1
3159 else:
3160 return int(np.max(tensor)) + 1
3161
3162 def coo_matrix(self, data, rows, cols, shape=None, type_as=None):
3163 if shape is None:

Callers 1

coo_matrixMethod · 0.95

Calls 2

maxMethod · 0.95
maxMethod · 0.45

Tested by

no test coverage detected