probly.representation.conformal_set.array.ArrayIntervalConformalSet¶
- class probly.representation.conformal_set.array.ArrayIntervalConformalSet(array: ndarray)[source]¶
Bases:
ArrayAxisProtected[ArraySample],IntervalConformalSetInterval conformal set backed by a NumPy array storing lower and upper bounds.
- array: np.ndarray¶
- astype(dtype: DTypeLike, order: Order = 'K', casting: Literal['no', 'equiv', 'safe', 'same_kind', 'unsafe'] = 'unsafe', subok: bool = True, copy: bool = True) Self[source]¶
Copy of the array, cast to a specified type.
- property flags: ArrayFlagsLike¶
The flags of the array.
- classmethod from_array_samples(lower: ndarray, upper: ndarray) Self[source]¶
Create an interval conformal set from lower and upper bound arrays.
- Parameters:
lower – The lower bound array.
upper – The upper bound array.
- Returns:
The created interval conformal set.
- classmethod from_samples(lower: ArraySample, upper: ArraySample) Self[source]¶
Create an interval conformal set from two ArraySamples.
- Parameters:
lower – The lower bound sample.
upper – The upper bound sample.
- Returns:
The created interval conformal set.
- permitted_functions = {}¶
- permitted_ufuncs = {}¶
- protected_values(func: Callable | None = None, method: str | None = None) dict[str, ArrayProtectedValue] | None[source]¶
Return all protected field values.
The values are preserved as-is and are not coerced to
np.ndarray. Optionally takes the function that triggered the call for context. This can be used to conditionally modify the returned values or prevent them from being accessed.
- reshape(*shape: int | tuple[int, ...], order: str = 'C', copy: bool | None = None) Self[source]¶
Return a copy with reshaped protected values.
- transpose(*axes: int | None) Self[source]¶
Return a transposed version of the ArraySample.
This method implicitly also provides full axis tracking support for - np.moveaxis - np.rollaxis Those functions call out to transpose methods for custom array types.
- Parameters:
axes – The axes to transpose.
- Returns:
A transposed version of the ArraySample.
- type = 'interval'¶