Skip to content

Commit

Permalink
API:move use of maybe_convert_numeric_to_64bit to IntervalArray._simp…
Browse files Browse the repository at this point in the history
…le_new
  • Loading branch information
topper-123 committed Dec 12, 2022
1 parent 286166d commit 76e7938
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pandas/core/arrays/interval.py
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,6 @@ def __new__(

# might need to convert empty or purely na data
data = _maybe_convert_platform_interval(data)
data = maybe_convert_numeric_to_64bit(data)
left, right, infer_closed = intervals_to_interval_bounds(
data, validate_closed=closed is None
)
Expand Down Expand Up @@ -304,8 +303,12 @@ def _simple_new(
closed = dtype.closed

closed = closed or "right"

left = ensure_index(left, copy=copy)
left = maybe_convert_numeric_to_64bit(left)

right = ensure_index(right, copy=copy)
right = maybe_convert_numeric_to_64bit(right)

if dtype is not None:
# GH 19262: dtype must be an IntervalDtype to override inferred
Expand Down

0 comments on commit 76e7938

Please sign in to comment.