(self)
| 1874 | assert_equal(np.any(a, where=False), False) |
| 1875 | |
| 1876 | def test_compress(self): |
| 1877 | tgt = [[5, 6, 7, 8, 9]] |
| 1878 | arr = np.arange(10).reshape(2, 5) |
| 1879 | out = arr.compress([0, 1], axis=0) |
| 1880 | assert_equal(out, tgt) |
| 1881 | |
| 1882 | tgt = [[1, 3], [6, 8]] |
| 1883 | out = arr.compress([0, 1, 0, 1, 0], axis=1) |
| 1884 | assert_equal(out, tgt) |
| 1885 | |
| 1886 | tgt = [[1], [6]] |
| 1887 | arr = np.arange(10).reshape(2, 5) |
| 1888 | out = arr.compress([0, 1], axis=1) |
| 1889 | assert_equal(out, tgt) |
| 1890 | |
| 1891 | arr = np.arange(10).reshape(2, 5) |
| 1892 | out = arr.compress([0, 1]) |
| 1893 | assert_equal(out, 1) |
| 1894 | |
| 1895 | def test_choose(self): |
| 1896 | x = 2*np.ones((3,), dtype=int) |
nothing calls this directly
no test coverage detected