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

Method test_bad_length

numpy/lib/tests/test_twodim_base.py:301–305  ·  view source on GitHub ↗
(self, x_len, y_len)

Source from the content-addressed store, hash-verified

299
300 @pytest.mark.parametrize(("x_len", "y_len"), [(10, 11), (20, 19)])
301 def test_bad_length(self, x_len, y_len):
302 x, y = np.ones(x_len), np.ones(y_len)
303 with pytest.raises(ValueError,
304 match='x and y must have the same length.'):
305 histogram2d(x, y)
306
307
308class TestTri:

Callers

nothing calls this directly

Calls 1

histogram2dFunction · 0.90

Tested by

no test coverage detected