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

Method test_default

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

Source from the content-addressed store, hash-verified

2657 assert_equal(x, 4)
2658
2659 def test_default(self):
2660 # No value specified for x[1], should be 0
2661 x = piecewise([1, 2], [True, False], [2])
2662 assert_array_equal(x, [2, 0])
2663
2664 # Should set x[1] to 3
2665 x = piecewise([1, 2], [True, False], [2, 3])
2666 assert_array_equal(x, [2, 3])
2667
2668 def test_0d(self):
2669 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