You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have checked that this issue has not already been reported.
I have confirmed this bug exists on the latest version of pandas.
I have confirmed this bug exists on the main branch of pandas.
Reproducible Example
>>>frompandas.core.apiimportNumericIndex>>>idx=NumericIndex([1, 2, 3], dtype="float16")
>>>idxNumericIndex([1, 2, 3], dtype="float16") # should be float 32, see below>>>idx.get_loc(1)
KeyError: 1
Issue Description
pandas doesn't have a float16 indexing engine (because khash doesn't have float16 hashing functionality), so can't/shouldn't have float16 index either. If a float16 array is given to NumericIndex, the index should be converted to a float32 index .
Expected Behavior
If a float16 array is given to NumericIndex, the index should be converted to a float32 index .
Installed Versions
Replace this line with the output of pd.show_versions()
The text was updated successfully, but these errors were encountered:
Pandas version checks
I have checked that this issue has not already been reported.
I have confirmed this bug exists on the latest version of pandas.
I have confirmed this bug exists on the main branch of pandas.
Reproducible Example
Issue Description
pandas doesn't have a float16 indexing engine (because khash doesn't have float16 hashing functionality), so can't/shouldn't have float16 index either. If a float16 array is given to NumericIndex, the index should be converted to a float32 index .
Expected Behavior
If a float16 array is given to NumericIndex, the index should be converted to a float32 index .
Installed Versions
Replace this line with the output of pd.show_versions()
The text was updated successfully, but these errors were encountered: