SPIKE\_TRAIN\_\_MATRIX ====================== .. currentmodule:: myogen.utils.types .. py:data:: SPIKE_TRAIN__MATRIX **Alias of:** ``Annotated[npt.NDArray[np.bool_], Is[lambda x: x.ndim == 3]]`` .. rubric:: Type Definition This type alias is defined using beartype validators:: from typing import Annotated import numpy.typing as npt from beartype.vale import Is SPIKE_TRAIN__MATRIX = Annotated[ npt.NDArray[np.floating], # or np.bool_ for boolean arrays Is[lambda x: x.ndim == N], # where N is the required dimensions ] .. rubric:: Runtime Type Checking Use with beartype for automatic validation:: from myogen.utils.types import SPIKE_TRAIN__MATRIX from beartype import beartype @beartype def process_spike_data(data: SPIKE_TRAIN__MATRIX) -> SPIKE_TRAIN__MATRIX: """Process data with automatic shape validation.""" # beartype automatically validates array dimensions return data .. tip:: 🐻 **Beartype Integration**: This type uses `beartype `_ validators to ensure arrays have the correct number of dimensions at runtime. .. note:: 📐 **Array Validation**: The `Is[lambda x: x.ndim == N]` validator automatically checks that your NumPy arrays have the expected shape for MyoGen operations.