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

Method where

ot/backend.py:1771–1775  ·  view source on GitHub ↗
(self, condition, x=None, y=None)

Source from the content-addressed store, hash-verified

1769 return a
1770
1771 def where(self, condition, x=None, y=None):
1772 if x is None and y is None:
1773 return jnp.where(condition)
1774 else:
1775 return jnp.where(condition, x, y)
1776
1777 def copy(self, a):
1778 # No need to copy, JAX arrays are immutable

Callers 1

eliminate_zerosMethod · 0.95

Calls 1

whereMethod · 0.45

Tested by

no test coverage detected