Uniform

class kgpy.uncertainty.Uniform(nominal=<Quantity 0.>, width=<Quantity 0.>, num_samples=11, axis_distribution='_distribution', seed=None)

Bases: _DistributionMixin, _UniformBase[WidthT]

Parameters:
  • nominal (NominalT) –

  • width (WidthT) –

  • num_samples (int) –

  • axis_distribution (str) –

  • seed (int | None) –

__init__(nominal=<Quantity 0.>, width=<Quantity 0.>, num_samples=11, axis_distribution='_distribution', seed=None)
Parameters:
  • nominal (NominalT) –

  • width (WidthT) –

  • num_samples (int) –

  • axis_distribution (str) –

  • seed (int | None) –

Return type:

None

Attributes

array

array_labeled

axis_distribution

broadcasted

centers

distribution

dtype

indices

length

ndim

nominal

normalized

num_samples

seed

shape

shape_all

shape_distribution

type_array

type_array_auxiliary

unit

width

Methods

__init__([nominal, width, num_samples, ...])

add_axes(axes)

rtype:

typing.TypeVar(AbstractArrayT, bound= AbstractArray)

aligned(shape)

rtype:

typing.TypeVar(AbstractArrayT, bound= AbstractArray)

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(ArrayT, bound= Array)

broadcast_to(shape)

rtype:

typing.TypeVar(NDArrayMethodsMixinT, bound= NDArrayMethodsMixin)

combine_axes(axes[, axis_new])

rtype:

typing.TypeVar(AbstractArrayT, bound= AbstractArray)

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)

matrix_inverse(axis_rows, axis_columns)

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(ArrayT, bound= Array)

Inheritance Diagram

digraph inheritance338583958a { bgcolor=transparent; rankdir=TB; size="8.0, 12.0"; "kgpy.uncertainty.Uniform" [URL="kgpy.uncertainty.Uniform.html#kgpy.uncertainty.Uniform",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="Uniform(nominal: ~NominalT = <Quantity 0.>, width: ~WidthT = <Quantity 0.>, num_samples: int = 11, axis_distribution: str = '_distribution', seed: Optional[int] = None)"]; }
type_array_primary

alias of AbstractArray

add_axes(axes)
Return type:

typing.TypeVar(AbstractArrayT, bound= AbstractArray)

Parameters:
  • self (AbstractArrayT) –

  • axes (List[str]) –

aligned(shape)
Return type:

typing.TypeVar(AbstractArrayT, bound= AbstractArray)

Parameters:
  • self (AbstractArrayT) –

  • 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) –

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

typing.TypeVar(ArrayT, bound= Array)

Parameters:
broadcast_to(shape)
Return type:

typing.TypeVar(NDArrayMethodsMixinT, bound= NDArrayMethodsMixin)

Parameters:
  • self (NDArrayMethodsMixinT) –

  • shape (Dict[str, int]) –

combine_axes(axes, axis_new=None)
Return type:

typing.TypeVar(AbstractArrayT, bound= AbstractArray)

Parameters:
  • self (AbstractArrayT) –

  • 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]) –

matrix_inverse(axis_rows, axis_columns)
Parameters:
  • axis_rows (str) –

  • axis_columns (str) –

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) –

to(unit)
Return type:

typing.TypeVar(ArrayT, bound= Array)

Parameters:
  • self (AbstractArrayT) –

  • unit (Unit) –

property array: ndarray
property array_labeled: AbstractArrayT
axis_distribution: str = '_distribution'
property broadcasted: ArrayInterfaceT
property centers: ArrayInterfaceT
property distribution: UniformRandomSpace
property dtype
property indices: Dict[str, ArrayT]
property length: AbstractArrayT
property ndim: int
nominal: typing.TypeVar(NominalT, bound= typing.Union[int, float, numpy.ndarray, astropy.units.quantity.Quantity, kgpy.labeled.AbstractArray]) = <Quantity 0.>
property normalized: _UniformBaseT
num_samples: int = 11
seed: typing.Optional[int] = None
property shape: Dict[str, int]
property shape_all: Dict[str, int]
property shape_distribution: Dict[str, int]
type_array: typing.ClassVar[typing.Tuple[typing.Type, ...]] = (<class 'str'>, <class 'bool'>, <class 'int'>, <class 'float'>, <class 'complex'>, <class 'numpy.generic'>, <class 'numpy.ndarray'>, <class 'kgpy.labeled.AbstractArray'>)
type_array_auxiliary: typing.ClassVar[typing.Tuple[typing.Type, ...]] = (<class 'str'>, <class 'bool'>, <class 'int'>, <class 'float'>, <class 'complex'>, <class 'numpy.generic'>, <class 'numpy.ndarray'>)
property unit: float | Unit
width: typing.TypeVar(WidthT, bound= typing.Union[int, float, numpy.ndarray, astropy.units.quantity.Quantity, kgpy.labeled.AbstractArray]) = <Quantity 0.>