MCPcopy
hub / github.com/numpy/numpy / test_scalar_array

Method test_scalar_array

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

Source from the content-addressed store, hash-verified

181 )
182
183 def test_scalar_array(self, cls=np.ndarray):
184 a = np.ones((6, 3)).view(cls)
185 res = apply_along_axis(np.sum, 0, a)
186 assert_(isinstance(res, cls))
187 assert_array_equal(res, np.array([6, 6, 6]).view(cls))
188
189 def test_0d_array(self, cls=np.ndarray):
190 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