(self)
| 1866 | class TestStack: |
| 1867 | |
| 1868 | def test_stack_1d(self): |
| 1869 | a = masked_array([0, 1, 2], mask=[0, 1, 0]) |
| 1870 | b = masked_array([9, 8, 7], mask=[1, 0, 0]) |
| 1871 | |
| 1872 | c = stack([a, b], axis=0) |
| 1873 | assert_equal(c.shape, (2, 3)) |
| 1874 | assert_array_equal(a.mask, c[0].mask) |
| 1875 | assert_array_equal(b.mask, c[1].mask) |
| 1876 | |
| 1877 | d = vstack([a, b]) |
| 1878 | assert_array_equal(c.data, d.data) |
| 1879 | assert_array_equal(c.mask, d.mask) |
| 1880 | |
| 1881 | c = stack([a, b], axis=1) |
| 1882 | assert_equal(c.shape, (3, 2)) |
| 1883 | assert_array_equal(a.mask, c[:, 0].mask) |
| 1884 | assert_array_equal(b.mask, c[:, 1].mask) |
| 1885 | |
| 1886 | def test_stack_masks(self): |
| 1887 | a = masked_array([0, 1, 2], mask=True) |
nothing calls this directly
no test coverage detected