(self)
| 2099 | assert arr.all(dtype=object, keepdims=True).dtype == object |
| 2100 | |
| 2101 | def test_compress(self): |
| 2102 | tgt = [[5, 6, 7, 8, 9]] |
| 2103 | arr = np.arange(10).reshape(2, 5) |
| 2104 | out = arr.compress([0, 1], axis=0) |
| 2105 | assert_equal(out, tgt) |
| 2106 | |
| 2107 | tgt = [[1, 3], [6, 8]] |
| 2108 | out = arr.compress([0, 1, 0, 1, 0], axis=1) |
| 2109 | assert_equal(out, tgt) |
| 2110 | |
| 2111 | tgt = [[1], [6]] |
| 2112 | arr = np.arange(10).reshape(2, 5) |
| 2113 | out = arr.compress([0, 1], axis=1) |
| 2114 | assert_equal(out, tgt) |
| 2115 | |
| 2116 | arr = np.arange(10).reshape(2, 5) |
| 2117 | out = arr.compress([0, 1]) |
| 2118 | assert_equal(out, 1) |
| 2119 | |
| 2120 | def test_choose(self): |
| 2121 | x = 2 * np.ones((3,), dtype=int) |
nothing calls this directly
no test coverage detected