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

Method where

ot/backend.py:842–850  ·  view source on GitHub ↗

r""" Returns elements chosen from x or y depending on condition. This function follows the api from :any:`numpy.where` See: https://numpy.org/doc/stable/reference/generated/numpy.where.html

(self, condition, x, y)

Source from the content-addressed store, hash-verified

840 raise NotImplementedError()
841
842 def where(self, condition, x, y):
843 r"""
844 Returns elements chosen from x or y depending on condition.
845
846 This function follows the api from :any:`numpy.where`
847
848 See: https://numpy.org/doc/stable/reference/generated/numpy.where.html
849 """
850 raise NotImplementedError()
851
852 def copy(self, a):
853 r"""

Callers 15

test_empty_backendFunction · 0.95
compute_transport_planFunction · 0.45
whereMethod · 0.45
whereMethod · 0.45
whereMethod · 0.45
whereMethod · 0.45
eliminate_zerosMethod · 0.45
whereMethod · 0.45
gmm_ot_apply_mapFunction · 0.45

Calls

no outgoing calls

Tested by 8

test_empty_backendFunction · 0.76
test_func_backendsFunction · 0.36
unvectorizedFunction · 0.36
test_TFGW_optimFunction · 0.36
test_TFGW_variantsFunction · 0.36
test_TW_variantsFunction · 0.36
test_TWFunction · 0.36