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

Method eye

ot/backend.py:1582–1586  ·  view source on GitHub ↗
(self, N, M=None, type_as=None)

Source from the content-addressed store, hash-verified

1580 )
1581
1582 def eye(self, N, M=None, type_as=None):
1583 if type_as is None:
1584 return jnp.eye(N, M)
1585 else:
1586 return self._change_device(jnp.eye(N, M, dtype=type_as.dtype), type_as)
1587
1588 def sum(self, a, axis=None, keepdims=False):
1589 return jnp.sum(a, axis, keepdims=keepdims)

Callers

nothing calls this directly

Calls 2

_change_deviceMethod · 0.95
eyeMethod · 0.45

Tested by

no test coverage detected