MCPcopy Index your code
hub / github.com/numpy/numpy / test_two_conditions

Method test_two_conditions

numpy/lib/tests/test_function_base.py:2914–2916  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

2912 piecewise, [0, 0], [[False, True]], [1, 2, 3])
2913
2914 def test_two_conditions(self):
2915 x = piecewise([1, 2], [[True, False], [False, True]], [3, 4])
2916 assert_array_equal(x, [3, 4])
2917
2918 def test_scalar_domains_three_conditions(self):
2919 x = piecewise(3, [True, False, False], [4, 2, 0])

Callers

nothing calls this directly

Calls 2

piecewiseFunction · 0.90
assert_array_equalFunction · 0.90

Tested by

no test coverage detected