Skip to content

Commit

Permalink
fix NumericIndex_ensure_dtype
Browse files Browse the repository at this point in the history
  • Loading branch information
Terji Petersen authored and Terji Petersen committed Dec 20, 2022
1 parent 78f7b2d commit 03c5968
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions pandas/core/indexes/numeric.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,10 +210,7 @@ def _ensure_dtype(cls, dtype: Dtype | None) -> np.dtype | None:
dtype = pandas_dtype(dtype)
if not isinstance(dtype, np.dtype):
raise TypeError(f"{dtype} not a numpy type")
if dtype == np.float16:
# float16 not supported (no indexing engine)
dtype = np.dtype(np.float32)
if dtype == "float16":
elif dtype == np.float16:
# float16 not supported (no indexing engine)
raise NotImplementedError("float16 indexes are not supported")

Expand Down

0 comments on commit 03c5968

Please sign in to comment.