Linspace§
- final class typed_lisa_toolkit.types.Linspace[source]§
A lazy representation of a uniformly spaced array.
Note
To construct a Linspace, use
linspace(),linspace_from_step(), orlinspace_from_array().Attention
This class is designed to represent a uniform grid by three numbers. It does not try to implement the full interface of an array, but only a subset of it that is relevant for our use cases.
- classmethod make(array: Any | Linspace) Linspace[source]§
Create a Linspace from a numpy array or return the input if already Linspace.
- asarray(xp: MT, *, dtype: DT) Array[DT, MT][source]§
- asarray(xp: MT, *, dtype: None = None) Array[Any, MT]
Return the linspace as an array in the specified array library.
- property num: int§
The number of points in the grid.
- property shape: tuple[int]§
The shape of the array.
- property start: float§
The first point of the array.
- property step: float§
The step of the array.
- property stop: float§
The last point of the array.