ArrayInterface

class kgpy.labeled.ArrayInterface

Bases: Copyable, NDArrayMethodsMixin, NDArrayOperatorsMixin, ABC, Generic[ArrT]

__init__()
Return type:

None

Attributes

array

array_labeled

broadcasted

centers

dtype

indices

length

ndim

normalized

shape

unit

Methods

__init__()

add_axes(axes)

rtype:

typing.TypeVar(ArrayInterfaceT, bound= ArrayInterface)

aligned(shape)

rtype:

kgpy.labeled.ArrayInterface

all([axis, where])

rtype:

typing.TypeVar(NDArrayMethodsMixinT, bound= NDArrayMethodsMixin)

any([axis, where])

rtype:

typing.TypeVar(NDArrayMethodsMixinT, bound= NDArrayMethodsMixin)

astype(dtype[, order, casting, subok, copy])

rtype:

typing.TypeVar(ArrayInterfaceT, bound= ArrayInterface)

broadcast_to(shape)

rtype:

typing.TypeVar(NDArrayMethodsMixinT, bound= NDArrayMethodsMixin)

combine_axes(axes[, axis_new])

rtype:

typing.TypeVar(ArrayInterfaceT, bound= ArrayInterface)

copy()

rtype:

typing.TypeVar(CopyableT, bound= Copyable)

copy_shallow()

rtype:

typing.TypeVar(CopyableT, bound= Copyable)

index(value[, axis])

rtype:

typing.Dict[str, typing.TypeVar(ArrayInterfaceT, bound= ArrayInterface)]

index_below_brute(value[, axis])

rtype:

typing.Dict[str, typing.TypeVar(ArrayInterfaceT, bound= ArrayInterface)]

index_nearest_brute(value[, axis, where])

rtype:

typing.Dict[str, typing.TypeVar(ArrayInterfaceT, bound= ArrayInterface)]

index_secant(value[, axis, damping])

rtype:

typing.Dict[str, typing.TypeVar(ArrayT, bound= Array)]

interp_linear(item)

rtype:

typing.TypeVar(ArrayInterfaceT, bound= ArrayInterface)

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:

typing.Iterator[typing.Dict[str, int]]

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)

std([axis, where])

rtype:

typing.TypeVar(NDArrayMethodsMixinT, bound= NDArrayMethodsMixin)

sum([axis, where])

rtype:

typing.TypeVar(NDArrayMethodsMixinT, bound= NDArrayMethodsMixin)

to(unit)

rtype:

typing.TypeVar(ArrayInterfaceT, bound= ArrayInterface)

Inheritance Diagram

digraph inheritanceba0d2dc71a { bgcolor=transparent; rankdir=TB; size="8.0, 12.0"; "abc.ABC" [URL="https://docs.python.org/3/library/abc.html#abc.ABC",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="Helper class that provides a standard way to create an ABC using"]; "kgpy.labeled.ArrayInterface" [URL="kgpy.labeled.ArrayInterface.html#kgpy.labeled.ArrayInterface",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="ArrayInterface()"]; "kgpy.mixin.Copyable" -> "kgpy.labeled.ArrayInterface" [arrowsize=0.5,style="setlinewidth(0.5)"]; "kgpy.labeled.NDArrayMethodsMixin" -> "kgpy.labeled.ArrayInterface" [arrowsize=0.5,style="setlinewidth(0.5)"]; "numpy.lib.mixins.NDArrayOperatorsMixin" -> "kgpy.labeled.ArrayInterface" [arrowsize=0.5,style="setlinewidth(0.5)"]; "abc.ABC" -> "kgpy.labeled.ArrayInterface" [arrowsize=0.5,style="setlinewidth(0.5)"]; "typing.Generic" -> "kgpy.labeled.ArrayInterface" [arrowsize=0.5,style="setlinewidth(0.5)"]; "kgpy.labeled.NDArrayMethodsMixin" [URL="kgpy.labeled.NDArrayMethodsMixin.html#kgpy.labeled.NDArrayMethodsMixin",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="NDArrayMethodsMixin()"]; "kgpy.mixin.Copyable" [URL="kgpy.mixin.Copyable.html#kgpy.mixin.Copyable",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"]; "abc.ABC" -> "kgpy.mixin.Copyable" [arrowsize=0.5,style="setlinewidth(0.5)"]; "numpy.lib.mixins.NDArrayOperatorsMixin" [URL="https://numpy.org/doc/stable/reference/generated/numpy.lib.mixins.NDArrayOperatorsMixin.html#numpy.lib.mixins.NDArrayOperatorsMixin",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="Mixin defining all operator special methods using __array_ufunc__."]; "typing.Generic" [URL="https://docs.python.org/3/library/typing.html#typing.Generic",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="Abstract base class for generic types."]; }
abstract add_axes(axes)
Return type:

typing.TypeVar(ArrayInterfaceT, bound= ArrayInterface)

Parameters:
  • self (ArrayInterfaceT) –

  • axes (List) –

abstract aligned(shape)
Return type:

kgpy.labeled.ArrayInterface

Parameters:
  • self (ArrayInterfaceT) –

  • shape (Dict[str, int]) –

all(axis=None, where=<no value>)
Return type:

typing.TypeVar(NDArrayMethodsMixinT, bound= NDArrayMethodsMixin)

Parameters:
  • self (NDArrayMethodsMixinT) –

  • axis (str | Sequence[str] | None) –

  • where (NDArrayMethodsMixinT) –

any(axis=None, where=<no value>)
Return type:

typing.TypeVar(NDArrayMethodsMixinT, bound= NDArrayMethodsMixin)

Parameters:
  • self (NDArrayMethodsMixinT) –

  • axis (str | Sequence[str] | None) –

  • where (NDArrayMethodsMixinT) –

abstract astype(dtype, order='K', casting='unsafe', subok=True, copy=True)
Return type:

typing.TypeVar(ArrayInterfaceT, bound= ArrayInterface)

Parameters:
broadcast_to(shape)
Return type:

typing.TypeVar(NDArrayMethodsMixinT, bound= NDArrayMethodsMixin)

Parameters:
  • self (NDArrayMethodsMixinT) –

  • shape (Dict[str, int]) –

abstract combine_axes(axes, axis_new=None)
Return type:

typing.TypeVar(ArrayInterfaceT, bound= ArrayInterface)

Parameters:
  • self (ArrayInterfaceT) –

  • axes (Sequence[str]) –

  • axis_new (str | None) –

copy()
Return type:

typing.TypeVar(CopyableT, bound= Copyable)

Parameters:

self (CopyableT) –

copy_shallow()
Return type:

typing.TypeVar(CopyableT, bound= Copyable)

Parameters:

self (CopyableT) –

index(value, axis=None)
Return type:

typing.Dict[str, typing.TypeVar(ArrayInterfaceT, bound= ArrayInterface)]

Parameters:
  • self (ArrayInterfaceT) –

  • value (ArrayInterfaceT) –

  • axis (str | Sequence[str] | None) –

index_below_brute(value, axis=None)
Return type:

typing.Dict[str, typing.TypeVar(ArrayInterfaceT, bound= ArrayInterface)]

Parameters:
  • self (ArrayInterfaceT) –

  • value (ArrayInterfaceT) –

  • axis (str | Sequence[str] | None) –

index_nearest_brute(value, axis=None, where=None)
Return type:

typing.Dict[str, typing.TypeVar(ArrayInterfaceT, bound= ArrayInterface)]

Parameters:
  • self (ArrayInterfaceT) –

  • value (ArrayInterfaceT) –

  • axis (str | Sequence[str] | None) –

  • where (ArrayInterfaceT | None) –

index_secant(value, axis=None, damping=1)
Return type:

typing.Dict[str, typing.TypeVar(ArrayT, bound= Array)]

Parameters:
  • self (ArrayInterfaceT) –

  • value (ArrayInterfaceT) –

  • axis (str | Sequence[str] | None) –

  • damping (float) –

interp_linear(item)
Return type:

typing.TypeVar(ArrayInterfaceT, bound= ArrayInterface)

Parameters:
  • self (ArrayInterfaceT) –

  • item (Dict[str, AbstractArrayT]) –

max(axis=None, initial=None, where=<no value>)
Return type:

typing.TypeVar(NDArrayMethodsMixinT, bound= NDArrayMethodsMixin)

Parameters:
mean(axis=None, where=<no value>)
Return type:

typing.TypeVar(NDArrayMethodsMixinT, bound= NDArrayMethodsMixin)

Parameters:
  • self (NDArrayMethodsMixinT) –

  • axis (str | Sequence[str] | None) –

  • where (NDArrayMethodsMixinT) –

min(axis=None, initial=None, where=<no value>)
Return type:

typing.TypeVar(NDArrayMethodsMixinT, bound= NDArrayMethodsMixin)

Parameters:
ndindex(axis_ignored=None)
Return type:

typing.Iterator[typing.Dict[str, int]]

Parameters:
ptp(axis=None)
Return type:

typing.TypeVar(NDArrayMethodsMixinT, bound= NDArrayMethodsMixin)

Parameters:
  • self (NDArrayMethodsMixinT) –

  • axis (str | Sequence[str] | None) –

reshape(shape)
Return type:

typing.TypeVar(NDArrayMethodsMixinT, bound= NDArrayMethodsMixin)

Parameters:
  • self (NDArrayMethodsMixinT) –

  • shape (Dict[str, int]) –

rms(axis=None, where=<no value>)
Return type:

typing.TypeVar(NDArrayMethodsMixinT, bound= NDArrayMethodsMixin)

Parameters:
  • self (NDArrayMethodsMixinT) –

  • axis (str | Sequence[str] | None) –

  • where (NDArrayMethodsMixinT) –

std(axis=None, where=<no value>)
Return type:

typing.TypeVar(NDArrayMethodsMixinT, bound= NDArrayMethodsMixin)

Parameters:
  • self (NDArrayMethodsMixinT) –

  • axis (str | Sequence[str] | None) –

  • where (NDArrayMethodsMixinT) –

sum(axis=None, where=<no value>)
Return type:

typing.TypeVar(NDArrayMethodsMixinT, bound= NDArrayMethodsMixin)

Parameters:
  • self (NDArrayMethodsMixinT) –

  • axis (str | Sequence[str] | None) –

  • where (NDArrayMethodsMixinT) –

abstract to(unit)
Return type:

typing.TypeVar(ArrayInterfaceT, bound= ArrayInterface)

Parameters:
  • self (ArrayInterfaceT) –

  • unit (UnitBase) –

abstract property array: ArrT
abstract property array_labeled: ArrayInterfaceT
property broadcasted: ArrayInterfaceT
property centers: ArrayInterfaceT
property dtype
property indices: Dict[str, ArrayT]
property length: AbstractArrayT
property ndim: int
abstract property normalized: ArrayInterfaceT
abstract property shape: Dict[str, int]
abstract property unit: float | Unit