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

Method test_functionality

numpy/lib/tests/test_shape_base.py:281–287  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

279
280class TestExpandDims:
281 def test_functionality(self):
282 s = (2, 3, 4, 5)
283 a = np.empty(s)
284 for axis in range(-5, 4):
285 b = expand_dims(a, axis)
286 assert_(b.shape[axis] == 1)
287 assert_(np.squeeze(b).shape == s)
288
289 def test_axis_tuple(self):
290 a = np.empty((3, 3, 3))

Callers

nothing calls this directly

Calls 3

expand_dimsFunction · 0.90
assert_Function · 0.90
squeezeMethod · 0.45

Tested by

no test coverage detected