StratifiedRandomSpace¶
- class kgpy.labeled.StratifiedRandomSpace(start=None, stop=None, num=None, endpoint=True, axis=None, seed=None, shape_extra=<factory>)¶
Bases:
_RandomSpaceMixin,LinearSpace[StartArrayT,StopArrayT]- Parameters:
- __init__(start=None, stop=None, num=None, endpoint=True, axis=None, seed=None, shape_extra=<factory>)¶
Attributes
Methods
__init__([start, stop, num, endpoint, axis, ...])add_axes(axes)- rtype:
typing.TypeVar(AbstractArrayT, bound= AbstractArray)
aligned(shape)- rtype:
typing.TypeVar(ArrayT, bound= Array)
all([axis, where])- rtype:
typing.TypeVar(NDArrayMethodsMixinT, bound= NDArrayMethodsMixin)
any([axis, where])- rtype:
typing.TypeVar(NDArrayMethodsMixinT, bound= NDArrayMethodsMixin)
array_aligned(shape)- rtype:
typing.TypeVar(ArrT, bound=typing.Union[int,float,numpy.ndarray,astropy.units.quantity.Quantity])
astype(dtype[, order, casting, subok, copy])- rtype:
typing.TypeVar(ArrayT, bound= Array)
broadcast_shapes(*arrs)- rtype:
broadcast_to(shape)- rtype:
typing.TypeVar(NDArrayMethodsMixinT, bound= NDArrayMethodsMixin)
change_axis_index(axis, index)colorize_axis(axis[, percentile_max, ...])- rtype:
combine_axes(axes[, axis_new])- rtype:
copy()- rtype:
typing.TypeVar(CopyableT, bound= Copyable)
- rtype:
typing.TypeVar(CopyableT, bound= Copyable)
filter_mean(shape_kernel)filter_mean_trimmed(shape_kernel[, proportion])filter_median(shape_kernel[, mode])index(value, axis)- rtype:
typing.Dict[str,typing.TypeVar(ArrayT, bound= Array)]
index_below(value)- rtype:
typing.Dict[str,typing.TypeVar(AbstractArrayT, bound= AbstractArray)]
index_below_brute(value[, axis])- rtype:
typing.Dict[str,typing.TypeVar(ArrayInterfaceT, bound= ArrayInterface)]
index_nearest(value)- rtype:
typing.Dict[str,typing.TypeVar(AbstractArrayT, bound= AbstractArray)]
index_nearest_brute(value[, axis, where])- rtype:
typing.Dict[str,typing.TypeVar(ArrayInterfaceT, bound= ArrayInterface)]
index_nearest_secant(value[, axis])- rtype:
typing.Dict[str,typing.TypeVar(AbstractArrayT, bound= AbstractArray)]
index_secant(value[, axis, damping])- rtype:
typing.Dict[str,typing.TypeVar(ArrayT, bound= Array)]
interp_linear(item)- rtype:
matrix_determinant(axis_rows, axis_columns)- rtype:
matrix_inverse(axis_rows, axis_columns)- rtype:
matrix_multiply(other, axis_rows, axis_columns)- rtype:
max([axis, initial, where])- rtype:
typing.TypeVar(NDArrayMethodsMixinT, bound= NDArrayMethodsMixin)
mean([axis, where])- rtype:
typing.TypeVar(NDArrayMethodsMixinT, bound= NDArrayMethodsMixin)
min([axis, initial, where])- rtype:
typing.TypeVar(NDArrayMethodsMixinT, bound= NDArrayMethodsMixin)
ndindex([axis_ignored])- rtype:
ptp([axis])- rtype:
typing.TypeVar(NDArrayMethodsMixinT, bound= NDArrayMethodsMixin)
reshape(shape)- rtype:
typing.TypeVar(NDArrayMethodsMixinT, bound= NDArrayMethodsMixin)
rms([axis, where])- rtype:
typing.TypeVar(NDArrayMethodsMixinT, bound= NDArrayMethodsMixin)
shape_broadcasted(*arrs)- rtype:
std([axis, where])- rtype:
typing.TypeVar(NDArrayMethodsMixinT, bound= NDArrayMethodsMixin)
sum([axis, where])- rtype:
typing.TypeVar(NDArrayMethodsMixinT, bound= NDArrayMethodsMixin)
to(unit)- rtype:
typing.TypeVar(ArrayT, bound= Array)
Inheritance Diagram
digraph inheritance5028c07ef6 { bgcolor=transparent; rankdir=TB; size="8.0, 12.0"; "kgpy.labeled.LinearSpace" [URL="kgpy.labeled.LinearSpace.html#kgpy.labeled.LinearSpace",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="LinearSpace(start: 'StartArrayT' = None, stop: 'StopArrayT' = None, num: 'int' = None, endpoint: 'bool' = True, axis: 'str' = None)"]; "kgpy.labeled.StratifiedRandomSpace" [URL="kgpy.labeled.StratifiedRandomSpace.html#kgpy.labeled.StratifiedRandomSpace",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="StratifiedRandomSpace(start: 'StartArrayT' = None, stop: 'StopArrayT' = None, num: 'int' = None, endpoint: 'bool' = True, axis: 'str' = None, seed: 'typ.Optional[int]' = None, shape_extra: 'typ.Dict[str, int]' = <factory>)"]; "kgpy.labeled.LinearSpace" -> "kgpy.labeled.StratifiedRandomSpace" [arrowsize=0.5,style="setlinewidth(0.5)"]; }- add_axes(axes)¶
- Return type:
typing.TypeVar(AbstractArrayT, bound= AbstractArray)- Parameters:
self (AbstractArrayT) –
axes (List) –
- aligned(shape)¶
- Return type:
typing.TypeVar(ArrayT, bound= Array)- Parameters:
- all(axis=None, where=<no value>)¶
- Return type:
typing.TypeVar(NDArrayMethodsMixinT, bound= NDArrayMethodsMixin)- Parameters:
- any(axis=None, where=<no value>)¶
- Return type:
typing.TypeVar(NDArrayMethodsMixinT, bound= NDArrayMethodsMixin)- Parameters:
- array_aligned(shape)¶
- Return type:
typing.TypeVar(ArrT, bound=typing.Union[int,float,numpy.ndarray,astropy.units.quantity.Quantity])- Parameters:
- astype(dtype, order='K', casting='unsafe', subok=True, copy=True)¶
- Return type:
typing.TypeVar(ArrayT, bound= Array)- Parameters:
- classmethod broadcast_shapes(*arrs)¶
- Return type:
- Parameters:
arrs (AbstractArrayT) –
- broadcast_to(shape)¶
- Return type:
typing.TypeVar(NDArrayMethodsMixinT, bound= NDArrayMethodsMixin)- Parameters:
- colorize_axis(axis, percentile_max=<Quantity 99. %>, percentile_min=<Quantity 1. %>)¶
- Return type:
- Parameters:
self (AbstractArray) –
axis (str) –
percentile_max (Quantity) –
percentile_min (Quantity) –
- combine_axes(axes, axis_new=None)¶
- Return type:
- Parameters:
- copy()¶
- Return type:
typing.TypeVar(CopyableT, bound= Copyable)- Parameters:
self (CopyableT) –
- copy_shallow()¶
- Return type:
typing.TypeVar(CopyableT, bound= Copyable)- Parameters:
self (CopyableT) –
- filter_mean_trimmed(shape_kernel, proportion=0.25)¶
- filter_median(shape_kernel, mode='reflect')¶
- index(value, axis)¶
- Return type:
typing.Dict[str,typing.TypeVar(ArrayT, bound= Array)]- Parameters:
- index_below(value)¶
- Return type:
typing.Dict[str,typing.TypeVar(AbstractArrayT, bound= AbstractArray)]- Parameters:
value (AbstractArrayT) –
- index_below_brute(value, axis=None)¶
- Return type:
typing.Dict[str,typing.TypeVar(ArrayInterfaceT, bound= ArrayInterface)]- Parameters:
- index_nearest(value)¶
- Return type:
typing.Dict[str,typing.TypeVar(AbstractArrayT, bound= AbstractArray)]- Parameters:
value (AbstractArrayT) –
- index_nearest_brute(value, axis=None, where=None)¶
- Return type:
typing.Dict[str,typing.TypeVar(ArrayInterfaceT, bound= ArrayInterface)]- Parameters:
- index_nearest_secant(value, axis=None)¶
- Return type:
typing.Dict[str,typing.TypeVar(AbstractArrayT, bound= AbstractArray)]- Parameters:
- index_secant(value, axis=None, damping=1)¶
- Return type:
typing.Dict[str,typing.TypeVar(ArrayT, bound= Array)]- Parameters:
- interp_linear(item)¶
- Return type:
- Parameters:
- matrix_determinant(axis_rows, axis_columns)¶
- Return type:
- Parameters:
- matrix_inverse(axis_rows, axis_columns)¶
- Return type:
- Parameters:
- matrix_multiply(other, axis_rows, axis_columns)¶
- Return type:
- Parameters:
- max(axis=None, initial=None, where=<no value>)¶
- mean(axis=None, where=<no value>)¶
- Return type:
typing.TypeVar(NDArrayMethodsMixinT, bound= NDArrayMethodsMixin)- Parameters:
- min(axis=None, initial=None, where=<no value>)¶
- ndindex(axis_ignored=None)¶
- Return type:
- Parameters:
- ptp(axis=None)¶
- Return type:
typing.TypeVar(NDArrayMethodsMixinT, bound= NDArrayMethodsMixin)- Parameters:
- reshape(shape)¶
- Return type:
typing.TypeVar(NDArrayMethodsMixinT, bound= NDArrayMethodsMixin)- Parameters:
- rms(axis=None, where=<no value>)¶
- Return type:
typing.TypeVar(NDArrayMethodsMixinT, bound= NDArrayMethodsMixin)- Parameters:
- shape_broadcasted(*arrs)¶
- Return type:
- Parameters:
self (AbstractArrayT) –
arrs (AbstractArrayT) –
- std(axis=None, where=<no value>)¶
- Return type:
typing.TypeVar(NDArrayMethodsMixinT, bound= NDArrayMethodsMixin)- Parameters:
- sum(axis=None, where=<no value>)¶
- Return type:
typing.TypeVar(NDArrayMethodsMixinT, bound= NDArrayMethodsMixin)- Parameters:
- to(unit)¶
- Return type:
typing.TypeVar(ArrayT, bound= Array)- Parameters:
self (AbstractArrayT) –
unit (Unit) –
- property array_labeled: AbstractArrayT¶
- property broadcasted: ArrayInterfaceT¶
- property centers: LinearSpace¶
- property dtype¶
- property length: AbstractArrayT¶
- property normalized: _RangeMixinT¶
-
seed:
typing.Optional[int] = None¶
-
shape_extra:
typing.Dict[str,int]¶
-
start:
typing.TypeVar(StartArrayT, bound= ArrayLike) = None¶
- property step: StartArrayT | StopArrayT¶
-
stop:
typing.TypeVar(StopArrayT, bound= ArrayLike) = None¶
-
type_array:
typing.ClassVar[typing.Tuple[typing.Type,...]] = (<class 'str'>, <class 'bool'>, <class 'int'>, <class 'float'>, <class 'complex'>, <class 'numpy.generic'>, <class 'numpy.ndarray'>)¶
-
type_array_auxiliary:
typing.ClassVar[typing.Tuple[typing.Type,...]] = (<class 'str'>, <class 'bool'>, <class 'int'>, <class 'float'>, <class 'complex'>, <class 'numpy.generic'>)¶