ASDF file with fields !core/ndarray-1.0.0 are serialized to NDArrayType, a custom data type from ASDF (not the same as np.ndarray).
This causes issues with pydantic models with field typed as np.ndarray (or np.typing.NDArray). Validation fails since NDArrayType is not equal to np.ndarray.
Currently you may work around this by annotating numpy fields as NDArrayType
ASDF file with fields
!core/ndarray-1.0.0are serialized to NDArrayType, a custom data type from ASDF (not the same asnp.ndarray).This causes issues with pydantic models with field typed as
np.ndarray(ornp.typing.NDArray). Validation fails sinceNDArrayTypeis not equal tonp.ndarray.Currently you may work around this by annotating numpy fields as
NDArrayType