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

Method test_0d_0d_condition

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

Source from the content-addressed store, hash-verified

2959 piecewise, x, [x <= 3, x > 3], [1, 1, 1, 1])
2960
2961 def test_0d_0d_condition(self):
2962 x = np.array(3)
2963 c = np.array(x > 3)
2964 y = piecewise(x, [c], [1, 2])
2965 assert_equal(y, 2)
2966
2967 def test_multidimensional_extrafunc(self):
2968 x = np.array([[-2.5, -1.5, -0.5],

Callers

nothing calls this directly

Calls 2

piecewiseFunction · 0.90
assert_equalFunction · 0.90

Tested by

no test coverage detected