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

Method test_0d_0d_condition

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

Source from the content-addressed store, hash-verified

2696 piecewise, x, [x <= 3, x > 3], [1, 1, 1, 1])
2697
2698 def test_0d_0d_condition(self):
2699 x = np.array(3)
2700 c = np.array(x > 3)
2701 y = piecewise(x, [c], [1, 2])
2702 assert_equal(y, 2)
2703
2704 def test_multidimensional_extrafunc(self):
2705 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