outRange¶
-
utilipy.data_utils.select.
outRange
(*args: Union[numpy.array, Sequence], rng: Union[Sequence, ellipsis] = Ellipsis, lbi: bool = True, ubi: bool = False, as_ind: bool = False) → numpy.array[source]¶ Multidimensional box exclusion.
equivelent to ~inRange
- Parameters
- argsSequence
either list of values along each dimension or list of values & bounds the input type depends on
rng
- rngEllipsis or Sequence, optional
(default Ellipsis) if rng is not Ellipsis:
args = [[x1], [x2], ...] rng = [1st [lower, upper], 2nd [lower, upper], ...]
else, args are the list of (x, [lower bound, upper. bound])
- lbibool, optional
(default False) Lower Bound Inclusive, whether to be inclusive on the lower bound
- ubibool, optional
(default True) Upper Bound Inclusive, whether to be inclusive on the upper bound
- as_indbool, optional
(default False) whether to return bool array or the indices (where(bool array == True)) sets the default behavior for the wrapped fnction func
- Returns
- outrangendarray of bool or ndarray of int
boolean array to select values outside box selection if as_ind, then index array of same
Todo
allow
lbi
&rbi
to be lists, matchingargs
, for indiv adjustment- Other Parameters
- as_indbool or “flatten”, optional
(default False) whether to return a boolean array, or array of indices.
- Raises
ValueError
if
as_ind
is “flatten” and cannot be flattened (len > 1)