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

Method test_atleast_2d

numpy/ma/tests/test_extras.py:1700–1708  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1698class TestShapeBase:
1699
1700 def test_atleast_2d(self):
1701 # Test atleast_2d
1702 a = masked_array([0, 1, 2], mask=[0, 1, 0])
1703 b = atleast_2d(a)
1704 assert_equal(b.shape, (1, 3))
1705 assert_equal(b.mask.shape, b.data.shape)
1706 assert_equal(a.shape, (3,))
1707 assert_equal(a.mask.shape, a.data.shape)
1708 assert_equal(b.mask.shape, b.data.shape)
1709
1710 def test_shape_scalar(self):
1711 # the atleast and diagflat function should work with scalars

Callers

nothing calls this directly

Calls 2

assert_equalFunction · 0.90
atleast_2dFunction · 0.85

Tested by

no test coverage detected