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

Method test_scalar_array

numpy/lib/tests/test_shape_base.py:154–158  ·  view source on GitHub ↗
(self, cls=np.ndarray)

Source from the content-addressed store, hash-verified

152 )
153
154 def test_scalar_array(self, cls=np.ndarray):
155 a = np.ones((6, 3)).view(cls)
156 res = apply_along_axis(np.sum, 0, a)
157 assert_(isinstance(res, cls))
158 assert_array_equal(res, np.array([6, 6, 6]).view(cls))
159
160 def test_0d_array(self, cls=np.ndarray):
161 def sum_to_0d(x):

Callers 1

Calls 4

apply_along_axisFunction · 0.90
assert_Function · 0.90
assert_array_equalFunction · 0.90
viewMethod · 0.45

Tested by

no test coverage detected