Skip to content

Commit

Permalink
Add longdouble type
Browse files Browse the repository at this point in the history
  • Loading branch information
Antoine DECHAUME committed Dec 5, 2022
1 parent 5ac44da commit febc2fe
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion pydantic_numpy/dtype.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,14 @@ def validate(cls, val: Any, field: ModelField):
return val


class double(np.float64, _BaseDType):
class longdouble(np.longdouble, _BaseDType):
pass


float128 = longdouble


class double(np.double, _BaseDType):
pass


Expand Down Expand Up @@ -105,6 +112,7 @@ class uint8(np.uint8, _BaseDType):

# NDArray typings

NDArrayFp128 = NDArray[float128]
NDArrayFp64 = NDArray[float64]
NDArrayFp32 = NDArray[float32]
NDArrayFp16 = NDArray[float16]
Expand Down

0 comments on commit febc2fe

Please sign in to comment.