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

Method test_bad_out_shape

numpy/core/tests/test_shape_base.py:363–370  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

361 assert_raises(TypeError, operator.concat, 1, a)
362
363 def test_bad_out_shape(self):
364 a = array([1, 2])
365 b = array([3, 4])
366
367 assert_raises(ValueError, concatenate, (a, b), out=np.empty(5))
368 assert_raises(ValueError, concatenate, (a, b), out=np.empty((4,1)))
369 assert_raises(ValueError, concatenate, (a, b), out=np.empty((1,4)))
370 concatenate((a, b), out=np.empty(4))
371
372 @pytest.mark.parametrize("axis", [None, 0])
373 @pytest.mark.parametrize("out_dtype", ["c8", "f4", "f8", ">f8", "i8", "S4"])

Callers

nothing calls this directly

Calls 3

arrayFunction · 0.90
assert_raisesFunction · 0.90
concatenateFunction · 0.90

Tested by

no test coverage detected