Integrate NumPy arrays into Pydantic models with type validation, shape constraints, and dtype checking. Currently version 9.0.1 (requires Python >=3.11, <3.15). Active development with frequent breaking changes across major versions.
pip install pydantic-numpyVerified import paths — ran on the pinned version, not inferred.
Create a Pydantic model with a validated NumPy array field; shape and dtype constraints are enforced.
Update imports to 'from pydantic_numpy import NDArray' and review the migration guide.
Use 'field: numpy_array(...)' inside class definition, not as a function call.
Always provide shape as a tuple: shape=(3, 4) not shape=[3, 4].
Check the latest documentation for current parameter names.