MCPcopy Index your code
hub / github.com/numpy/numpy / test_different_ndims

Method test_different_ndims

numpy/_core/tests/test_shape_base.py:835–843  ·  view source on GitHub ↗
(self, block)

Source from the content-addressed store, hash-verified

833 assert_raises_regex(TypeError, 'tuple', block, [(1, 2), (3, 4)])
834
835 def test_different_ndims(self, block):
836 a = 1.
837 b = 2 * np.ones((1, 2))
838 c = 3 * np.ones((1, 1, 3))
839
840 result = block([a, b, c])
841 expected = np.array([[[1., 2., 2., 3., 3., 3.]]])
842
843 assert_equal(result, expected)
844
845 def test_different_ndims_depths(self, block):
846 a = 1.

Callers

nothing calls this directly

Calls 2

blockFunction · 0.90
assert_equalFunction · 0.90

Tested by

no test coverage detected