yaw.core.coordinates.Dist3D#
- class yaw.core.coordinates.Dist3D(distance: ArrayLike)[source]#
Bases:
DistanceImplements a vector of Euclidean distances.
Constructs a new vector of distances.
- Parameters:
distance (
float,NDArray) – Distance values.
Note
The coordinate vector has a length, supports numpy-style indexing and iteration over the elements (always returning new coordinate vector instances).
Additionally, distances implement element-wise addition and subtraction, as well as the comparison operators.
Methods
__init__(distance)Constructs a new vector of distances.
from_dists(dists)Concatenate a sequence of distances into a new vector of distances.
max()Compute the maximum value and return it as new Distance instance.
min()Compute the minimum value and return it as new Distance instance.
to_3d()Convert the distance to the Euclidean distance.
to_sky()Convert the distance to an angular separation in radian.
Attributes
The distances cast into a numpy array with shape (N,) or a scalar if there is only a single distance.
- classmethod from_dists(dists: Sequence[_Tdist]) _Tdist#
Concatenate a sequence of distances into a new vector of distances.
- max() _Tdist#
Compute the maximum value and return it as new Distance instance.
- min() _Tdist#
Compute the minimum value and return it as new Distance instance.
- property values: NDArray[np.float64] | float#
The distances cast into a numpy array with shape (N,) or a scalar if there is only a single distance.