coordinates.mixins.core.CoordinateSystemAxesMixin.is_axis#

CoordinateSystemAxesMixin.is_axis(axis: str | Sequence[str]) bool | List[bool][source]#

Check whether the given axis name(s) exist in this coordinate system.

Parameters:

axis (str or list of str) – One or more axis names to validate.

Returns:

True/False for single input; list of bools for multiple inputs.

Return type:

bool or list of bool

Examples

>>> from pymetric.coordinates import SphericalCoordinateSystem
>>> cs = SphericalCoordinateSystem()
>>> cs.is_axis("theta")
True
>>> cs.is_axis(["r", "x"])
[True, False]