(self, categorical1, categorical2)
| 176 | assert_array_equal(result, np.array([1, np.nan], dtype=np.float32)) |
| 177 | |
| 178 | def test_where_extension_duck_array(self, categorical1, categorical2): |
| 179 | where_res = where( |
| 180 | np.array([True, False, True, False, False]), |
| 181 | PandasExtensionArray(categorical1), |
| 182 | PandasExtensionArray(categorical2), |
| 183 | ) |
| 184 | assert isinstance(where_res, PandasExtensionArray) |
| 185 | assert ( |
| 186 | where_res == pd.Categorical(["cat1", "cat1", "cat2", "cat3", "cat1"]) |
| 187 | ).all() |
| 188 | |
| 189 | @requires_cupy |
| 190 | def test_where_cupy_duck_array(self): |
nothing calls this directly
no test coverage detected