CORTICAL_INPUT__MATRIX#
- CORTICAL_INPUT__MATRIX#
Alias of: (see source code)
Type Definition
This type alias is defined using beartype validators:
from typing import Annotated import numpy.typing as npt from beartype.vale import Is CORTICAL_INPUT__MATRIX = Annotated[ npt.NDArray[np.floating], # or np.bool_ for boolean arrays Is[lambda x: x.ndim == N], # where N is the required dimensions ]
Runtime Type Checking
Use with beartype for automatic validation:
from myogen.utils.types import CORTICAL_INPUT__MATRIX from beartype import beartype @beartype def process_cortical_data(data: CORTICAL_INPUT__MATRIX) -> CORTICAL_INPUT__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.