def from_breaks( cls, breaks, closed: str = "right", name=None, copy: bool = False, dtype=None ): with rewrite_exception("IntervalArray", cls.__name__): array = IntervalArray.from_breaks( breaks, closed=closed, copy=copy, dtype=dtype ) return cls._simple_new(array, name=name)
def from_breaks( cls, breaks, closed: IntervalClosedType | None = "right", name: Hashable = None, copy: bool = False, dtype: Dtype | None = None, ) -> IntervalIndex: with rewrite_exception("IntervalArray", cls.__name__): array = IntervalArray.from_breaks(breaks, closed=closed, copy=copy, dtype=dtype) return cls._simple_new(array, name=name)
def from_breaks( cls, breaks, inclusive: IntervalInclusiveType | None = None, name: Hashable = None, copy: bool = False, dtype: Dtype | None = None, ) -> IntervalIndex: if inclusive is None: inclusive = "right" with rewrite_exception("IntervalArray", cls.__name__): array = IntervalArray.from_breaks(breaks, inclusive=inclusive, copy=copy, dtype=dtype) return cls._simple_new(array, name=name)
def from_breaks( cls, breaks, inclusive=None, closed: None | lib.NoDefault = lib.no_default, name: Hashable = None, copy: bool = False, dtype: Dtype | None = None, ) -> IntervalIndex: inclusive, closed = _warning_interval(inclusive, closed) if inclusive is None: inclusive = "both" with rewrite_exception("IntervalArray", cls.__name__): array = IntervalArray.from_breaks( breaks, inclusive=inclusive, copy=copy, dtype=dtype ) return cls._simple_new(array, name=name)
def from_breaks(cls, breaks, closed='right', name=None, copy=False, dtype=None): with rewrite_exception("IntervalArray", cls.__name__): array = IntervalArray.from_breaks(breaks, closed=closed, copy=copy, dtype=dtype) return cls._simple_new(array, name=name)