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
orlist
ofstr
) – One or more axis names to validate.- Returns:
True/False for single input; list of bools for multiple inputs.
- Return type:
Examples
>>> from pymetric.coordinates import SphericalCoordinateSystem >>> cs = SphericalCoordinateSystem() >>> cs.is_axis("theta") True
>>> cs.is_axis(["r", "x"]) [True, False]