MCPcopy Create free account
hub / github.com/numpy/numpy / _select

Method _select

numpy/lib/tests/test_function_base.py:438–442  ·  view source on GitHub ↗
(self, cond, values, default=0)

Source from the content-addressed store, hash-verified

436 np.array([False, False, True])]
437
438 def _select(self, cond, values, default=0):
439 output = []
440 for m in range(len(cond)):
441 output += [V[m] for V, C in zip(values, cond) if C[m]] or [default]
442 return output
443
444 def test_basic(self):
445 choices = self.choices

Callers 1

test_basicMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected