coordinates.mixins.core.CoordinateSystemAxesMixin.get_mask_from_axes#
- CoordinateSystemAxesMixin.get_mask_from_axes(axes: str | Sequence[str]) ndarray [source]#
Return a boolean mask of shape
(ndim,)
with True on the positions corresponding toaxes
.- Parameters:
axes (
str
orSequence[str]
) – An axis name or iterable of axis names.- Returns:
Boolean mask selecting those axes.
- Return type:
Examples
>>> cs.get_mask_from_axes("phi") array([False, False, True]) >>> cs.get_mask_from_axes(["r", "theta"]) array([ True, True, False])