An Axis object to handle axis parsing, axis validation and axis operations.
An AxisLike type alias to annotate what can be converted to this Axis object.
An Axis object can take most input that resembles an axis and create an Axis from it. For example Axis((1,2,3)), Axis(1,2,3), Axis(1.0, 2.0, 3.0), Axis(np.array([1,2,3])) and Axis([[1],[2],[3]]) are all valid and result in equal axis objects. During initialization and setting of the Axis.axis property, the underlying 1DArray is normalized. Hence, an Axis object is always normalized.
The Axis object is used for the internal representation. It is allowed for a user to give an Axis object to anything method that accept an AxisLike as input. However, this is not mandatory nor should it be incentivized.
This merge request contains the following:
Axis
object to handle axis parsing, axis validation and axis operations.AxisLike
type alias to annotate what can be converted to thisAxis
object.An
Axis
object can take most input that resembles an axis and create anAxis
from it. For exampleAxis((1,2,3))
,Axis(1,2,3)
,Axis(1.0, 2.0, 3.0)
,Axis(np.array([1,2,3]))
andAxis([[1],[2],[3]])
are all valid and result in equal axis objects. During initialization and setting of theAxis.axis
property, the underlying 1DArray is normalized. Hence, anAxis
object is always normalized.The
Axis
object is used for the internal representation. It is allowed for a user to give anAxis
object to anything method that accept anAxisLike
as input. However, this is not mandatory nor should it be incentivized.Closes #208