(self)
| 1791 | class TestStack: |
| 1792 | |
| 1793 | def test_stack_1d(self): |
| 1794 | a = masked_array([0, 1, 2], mask=[0, 1, 0]) |
| 1795 | b = masked_array([9, 8, 7], mask=[1, 0, 0]) |
| 1796 | |
| 1797 | c = stack([a, b], axis=0) |
| 1798 | assert_equal(c.shape, (2, 3)) |
| 1799 | assert_array_equal(a.mask, c[0].mask) |
| 1800 | assert_array_equal(b.mask, c[1].mask) |
| 1801 | |
| 1802 | d = vstack([a, b]) |
| 1803 | assert_array_equal(c.data, d.data) |
| 1804 | assert_array_equal(c.mask, d.mask) |
| 1805 | |
| 1806 | c = stack([a, b], axis=1) |
| 1807 | assert_equal(c.shape, (3, 2)) |
| 1808 | assert_array_equal(a.mask, c[:, 0].mask) |
| 1809 | assert_array_equal(b.mask, c[:, 1].mask) |
| 1810 | |
| 1811 | def test_stack_masks(self): |
| 1812 | a = masked_array([0, 1, 2], mask=True) |
nothing calls this directly
no test coverage detected