MCPcopy
hub / github.com/numpy/numpy / test_invalid_array_shape

Method test_invalid_array_shape

numpy/random/tests/test_randomstate.py:106–112  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

104 assert_raises(ValueError, random.RandomState, [1, -2, 4294967296])
105
106 def test_invalid_array_shape(self):
107 # gh-9832
108 assert_raises(ValueError, random.RandomState, np.array([],
109 dtype=np.int64))
110 assert_raises(ValueError, random.RandomState, [[1, 2, 3]])
111 assert_raises(ValueError, random.RandomState, [[1, 2, 3],
112 [4, 5, 6]])
113
114 def test_cannot_seed(self):
115 rs = random.RandomState(PCG64(0))

Callers

nothing calls this directly

Calls 1

assert_raisesFunction · 0.90

Tested by

no test coverage detected