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

Method test_2D_array

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

Source from the content-addressed store, hash-verified

145 assert_array_equal(res, desired)
146
147 def test_2D_array(self):
148 a = array([[1], [2]])
149 b = array([[1], [2]])
150 res = hstack([a, b])
151 desired = array([[1, 1], [2, 2]])
152 assert_array_equal(res, desired)
153
154 def test_generator(self):
155 with pytest.raises(TypeError, match="arrays to stack must be"):

Callers

nothing calls this directly

Calls 3

arrayFunction · 0.90
hstackFunction · 0.90
assert_array_equalFunction · 0.90

Tested by

no test coverage detected