Closed
Description
def test_object_factorize_dropna(
self, data, dropna, expected_codes, expected_uniques
):
codes, uniques = algos.factorize(data, dropna=dropna)
tm.assert_numpy_array_equal(uniques, expected_uniques)
> tm.assert_numpy_array_equal(codes, expected_codes)
E AssertionError: numpy array are different
E
E Attribute "dtype" are different
E [left]: int32
E [right]: int64
I'm not sure what the correct behavior is here, but the implementation is returning int32 while we're asserting int64. The test should probably check for np.dtype("intp")
.