Ejemplo n.º 1
0
 def from_tuples(cls, data, closed='right', name=None, copy=False,
                 dtype=None):
     with rewrite_exception("IntervalArray", cls.__name__):
         arr = IntervalArray.from_tuples(data, closed=closed, copy=copy,
                                         dtype=dtype)
     return cls._simple_new(arr, name=name)
Ejemplo n.º 2
0
 def from_arrays(cls, left, right, closed='right', name=None, copy=False,
                 dtype=None):
     with rewrite_exception("IntervalArray", cls.__name__):
         array = IntervalArray.from_arrays(left, right, closed, copy=copy,
                                           dtype=dtype)
     return cls._simple_new(array, name=name)
Ejemplo n.º 3
0
 def where(self, cond, other=None):
     if other is None:
         other = self._na_value
     values = np.where(cond, self._values, other)
     result = IntervalArray(values)
     return self._shallow_copy(result)
Ejemplo n.º 4
0
 def where(self, cond, other=None):
     if other is None:
         other = self._na_value
     values = np.where(cond, self._values, other)
     result = IntervalArray(values)
     return type(self)._simple_new(result, name=self.name)
Ejemplo n.º 5
0
 def from_tuples(cls, data, closed='right', name=None, copy=False,
                 dtype=None):
     with rewrite_exception("IntervalArray", cls.__name__):
         arr = IntervalArray.from_tuples(data, closed=closed, copy=copy,
                                         dtype=dtype)
     return cls._simple_new(arr, name=name)
Ejemplo n.º 6
0
 def from_arrays(cls, left, right, closed='right', name=None, copy=False,
                 dtype=None):
     with rewrite_exception("IntervalArray", cls.__name__):
         array = IntervalArray.from_arrays(left, right, closed, copy=copy,
                                           dtype=dtype)
     return cls._simple_new(array, name=name)