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

Method test_default

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

Source from the content-addressed store, hash-verified

2920 assert_equal(x, 4)
2921
2922 def test_default(self):
2923 # No value specified for x[1], should be 0
2924 x = piecewise([1, 2], [True, False], [2])
2925 assert_array_equal(x, [2, 0])
2926
2927 # Should set x[1] to 3
2928 x = piecewise([1, 2], [True, False], [2, 3])
2929 assert_array_equal(x, [2, 3])
2930
2931 def test_0d(self):
2932 x = np.array(3)

Callers

nothing calls this directly

Calls 2

piecewiseFunction · 0.90
assert_array_equalFunction · 0.90

Tested by

no test coverage detected