diff --git a/src/covjson_pydantic/ndarray.py b/src/covjson_pydantic/ndarray.py index 1a88838..9f7eb66 100644 --- a/src/covjson_pydantic/ndarray.py +++ b/src/covjson_pydantic/ndarray.py @@ -4,6 +4,7 @@ from typing import List from typing import Literal from typing import Optional +from typing import Union from pydantic import model_validator from typing_extensions import Generic @@ -23,7 +24,7 @@ class DataType(str, Enum): class NdArray(CovJsonBaseModel, Generic[NdArrayTypeT], extra="allow"): type: Literal["NdArray"] = "NdArray" - dataType: DataType | None = None # noqa: N815 + dataType: Union[DataType, None] = None # noqa: N815 axisNames: Optional[List[str]] = None # noqa: N815 shape: Optional[List[int]] = None values: List[Optional[NdArrayTypeT]] = []