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

Method _get_device

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

Source from the content-addressed store, hash-verified

1523 return np.array(a)
1524
1525 def _get_device(self, a):
1526 if self.jax_new_version:
1527 return list(a.devices())[0]
1528 else:
1529 return a.device_buffer.device()
1530
1531 def _change_device(self, a, type_as):
1532 return jax.device_put(a, self._get_device(type_as))

Callers 1

_change_deviceMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected