MCPcopy
hub / github.com/numpy/numpy / test_atleast_2d

Method test_atleast_2d

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

Source from the content-addressed store, hash-verified

1761class TestShapeBase:
1762
1763 def test_atleast_2d(self):
1764 # Test atleast_2d
1765 a = masked_array([0, 1, 2], mask=[0, 1, 0])
1766 b = atleast_2d(a)
1767 assert_equal(b.shape, (1, 3))
1768 assert_equal(b.mask.shape, b.data.shape)
1769 assert_equal(a.shape, (3,))
1770 assert_equal(a.mask.shape, a.data.shape)
1771 assert_equal(b.mask.shape, b.data.shape)
1772
1773 def test_shape_scalar(self):
1774 # 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