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

Method test_different_ndims

numpy/core/tests/test_shape_base.py:761–769  ·  view source on GitHub ↗
(self, block)

Source from the content-addressed store, hash-verified

759 assert_raises_regex(TypeError, 'tuple', block, [(1, 2), (3, 4)])
760
761 def test_different_ndims(self, block):
762 a = 1.
763 b = 2 * np.ones((1, 2))
764 c = 3 * np.ones((1, 1, 3))
765
766 result = block([a, b, c])
767 expected = np.array([[[1., 2., 2., 3., 3., 3.]]])
768
769 assert_equal(result, expected)
770
771 def test_different_ndims_depths(self, block):
772 a = 1.

Callers

nothing calls this directly

Calls 2

blockFunction · 0.90
assert_equalFunction · 0.90

Tested by

no test coverage detected