(self)
| 583 | tm.assert_index_equal(result, expected, exact=True) |
| 584 | |
| 585 | def test_factorize_multiindex_empty(self): |
| 586 | # GH#57517 |
| 587 | mi = MultiIndex.from_product( |
| 588 | [Index([], name="a", dtype=object), Index([], name="i", dtype="f4")] |
| 589 | ) |
| 590 | codes, uniques = mi.factorize() |
| 591 | exp_codes = np.array([], dtype=np.intp) |
| 592 | tm.assert_numpy_array_equal(codes, exp_codes) |
| 593 | tm.assert_index_equal(uniques, mi[:0]) |
| 594 | |
| 595 | def test_dtype_preservation(self, any_numpy_dtype): |
| 596 | # GH 15442 |
nothing calls this directly
no test coverage detected