Skip to content

Commit

Permalink
Refactor: 128float->LongDouble,256complex->ComplexLongDouble
Browse files Browse the repository at this point in the history
  • Loading branch information
caniko authored and Can H. Tartanoglu committed Jul 29, 2023
1 parent 3dd1d6a commit 1138230
Show file tree
Hide file tree
Showing 10 changed files with 51 additions and 49 deletions.
8 changes: 4 additions & 4 deletions pydantic_numpy/typing/i_dimensional.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@
Np1DArrayUint16 = np_array_pydantic_annotated_typing(data_type=np.uint16, dimensions=1)
Np1DArrayUint8 = np_array_pydantic_annotated_typing(data_type=np.uint8, dimensions=1)

Np1DArrayFp128 = np_array_pydantic_annotated_typing(data_type=np.longdouble, dimensions=1)
Np1DArrayFpLongDouble = np_array_pydantic_annotated_typing(data_type=np.longdouble, dimensions=1)
Np1DArrayFp64 = np_array_pydantic_annotated_typing(data_type=np.float64, dimensions=1)
Np1DArrayFp32 = np_array_pydantic_annotated_typing(data_type=np.float32, dimensions=1)
Np1DArrayFp16 = np_array_pydantic_annotated_typing(data_type=np.float16, dimensions=1)

Np1DArrayComplex256 = np_array_pydantic_annotated_typing(data_type=np.clongdouble, dimensions=1)
Np1DArrayComplexLongDouble = np_array_pydantic_annotated_typing(data_type=np.clongdouble, dimensions=1)
Np1DArrayComplex128 = np_array_pydantic_annotated_typing(data_type=np.complex128, dimensions=1)
Np1DArrayComplex64 = np_array_pydantic_annotated_typing(data_type=np.complex64, dimensions=1)

Expand All @@ -41,11 +41,11 @@
"Np1DArrayUint32",
"Np1DArrayUint16",
"Np1DArrayUint8",
"Np1DArrayFp128",
"Np1DArrayFpLongDouble",
"Np1DArrayFp64",
"Np1DArrayFp32",
"Np1DArrayFp16",
"Np1DArrayComplex256",
"Np1DArrayComplexLongDouble",
"Np1DArrayComplex128",
"Np1DArrayComplex64",
"Np1DArrayBool",
Expand Down
8 changes: 4 additions & 4 deletions pydantic_numpy/typing/ii_dimensional.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@
Np2DArrayUint16 = np_array_pydantic_annotated_typing(data_type=np.uint16, dimensions=2)
Np2DArrayUint8 = np_array_pydantic_annotated_typing(data_type=np.uint8, dimensions=2)

Np2DArrayFp128 = np_array_pydantic_annotated_typing(data_type=np.longdouble, dimensions=2)
Np2DArrayFpLongDouble = np_array_pydantic_annotated_typing(data_type=np.longdouble, dimensions=2)
Np2DArrayFp64 = np_array_pydantic_annotated_typing(data_type=np.float64, dimensions=2)
Np2DArrayFp32 = np_array_pydantic_annotated_typing(data_type=np.float32, dimensions=2)
Np2DArrayFp16 = np_array_pydantic_annotated_typing(data_type=np.float16, dimensions=2)

Np2DArrayComplex256 = np_array_pydantic_annotated_typing(data_type=np.clongdouble, dimensions=2)
Np2DArrayComplexLongDouble = np_array_pydantic_annotated_typing(data_type=np.clongdouble, dimensions=2)
Np2DArrayComplex128 = np_array_pydantic_annotated_typing(data_type=np.complex128, dimensions=2)
Np2DArrayComplex64 = np_array_pydantic_annotated_typing(data_type=np.complex64, dimensions=2)

Expand All @@ -41,11 +41,11 @@
"Np2DArrayUint32",
"Np2DArrayUint16",
"Np2DArrayUint8",
"Np2DArrayFp128",
"Np2DArrayFpLongDouble",
"Np2DArrayFp64",
"Np2DArrayFp32",
"Np2DArrayFp16",
"Np2DArrayComplex256",
"Np2DArrayComplexLongDouble",
"Np2DArrayComplex128",
"Np2DArrayComplex64",
"Np2DArrayBool",
Expand Down
8 changes: 4 additions & 4 deletions pydantic_numpy/typing/iii_dimensional.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@
Np3DArrayUint16 = np_array_pydantic_annotated_typing(data_type=np.uint16, dimensions=3)
Np3DArrayUint8 = np_array_pydantic_annotated_typing(data_type=np.uint8, dimensions=3)

Np3DArrayFp128 = np_array_pydantic_annotated_typing(data_type=np.longdouble, dimensions=3)
Np3DArrayFpLongDouble = np_array_pydantic_annotated_typing(data_type=np.longdouble, dimensions=3)
Np3DArrayFp64 = np_array_pydantic_annotated_typing(data_type=np.float64, dimensions=3)
Np3DArrayFp32 = np_array_pydantic_annotated_typing(data_type=np.float32, dimensions=3)
Np3DArrayFp16 = np_array_pydantic_annotated_typing(data_type=np.float16, dimensions=3)

Np3DArrayComplex256 = np_array_pydantic_annotated_typing(data_type=np.clongdouble, dimensions=3)
Np3DArrayComplexLongDouble = np_array_pydantic_annotated_typing(data_type=np.clongdouble, dimensions=3)
Np3DArrayComplex128 = np_array_pydantic_annotated_typing(data_type=np.complex128, dimensions=3)
Np3DArrayComplex64 = np_array_pydantic_annotated_typing(data_type=np.complex64, dimensions=3)

Expand All @@ -40,11 +40,11 @@
"Np3DArrayUint32",
"Np3DArrayUint16",
"Np3DArrayUint8",
"Np3DArrayFp128",
"Np3DArrayFpLongDouble",
"Np3DArrayFp64",
"Np3DArrayFp32",
"Np3DArrayFp16",
"Np3DArrayComplex256",
"Np3DArrayComplexLongDouble",
"Np3DArrayComplex128",
"Np3DArrayComplex64",
"Np3DArrayBool",
Expand Down
8 changes: 4 additions & 4 deletions pydantic_numpy/typing/n_dimensional.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@
NpNDArrayUint16 = np_array_pydantic_annotated_typing(data_type=np.uint16)
NpNDArrayUint8 = np_array_pydantic_annotated_typing(data_type=np.uint8)

NpNDArrayFp128 = np_array_pydantic_annotated_typing(data_type=np.longdouble)
NpNDArrayFpLongDouble = np_array_pydantic_annotated_typing(data_type=np.longdouble)
NpNDArrayFp64 = np_array_pydantic_annotated_typing(data_type=np.float64)
NpNDArrayFp32 = np_array_pydantic_annotated_typing(data_type=np.float32)
NpNDArrayFp16 = np_array_pydantic_annotated_typing(data_type=np.float16)

NpNDArrayComplex256 = np_array_pydantic_annotated_typing(data_type=np.clongdouble)
NpNDArrayComplexLongDouble = np_array_pydantic_annotated_typing(data_type=np.clongdouble)
NpNDArrayComplex128 = np_array_pydantic_annotated_typing(data_type=np.complex128)
NpNDArrayComplex64 = np_array_pydantic_annotated_typing(data_type=np.complex64)

Expand All @@ -41,11 +41,11 @@
"NpNDArrayUint32",
"NpNDArrayUint16",
"NpNDArrayUint8",
"NpNDArrayFp128",
"NpNDArrayFpLongDouble",
"NpNDArrayFp64",
"NpNDArrayFp32",
"NpNDArrayFp16",
"NpNDArrayComplex256",
"NpNDArrayComplexLongDouble",
"NpNDArrayComplex128",
"NpNDArrayComplex64",
"NpNDArrayBool",
Expand Down
10 changes: 6 additions & 4 deletions pydantic_numpy/typing/strict_data_type/i_dimensional.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,14 @@
NpStrict1DArrayUint16 = np_array_pydantic_annotated_typing(data_type=np.uint16, dimensions=1, strict_data_typing=True)
NpStrict1DArrayUint8 = np_array_pydantic_annotated_typing(data_type=np.uint8, dimensions=1, strict_data_typing=True)

NpStrict1DArrayFp128 = np_array_pydantic_annotated_typing(data_type=np.longdouble, dimensions=1, strict_data_typing=True)
NpStrict1DArrayFpLongDouble = np_array_pydantic_annotated_typing(
data_type=np.longdouble, dimensions=1, strict_data_typing=True
)
NpStrict1DArrayFp64 = np_array_pydantic_annotated_typing(data_type=np.float64, dimensions=1, strict_data_typing=True)
NpStrict1DArrayFp32 = np_array_pydantic_annotated_typing(data_type=np.float32, dimensions=1, strict_data_typing=True)
NpStrict1DArrayFp16 = np_array_pydantic_annotated_typing(data_type=np.float16, dimensions=1, strict_data_typing=True)

NpStrict1DArrayComplex256 = np_array_pydantic_annotated_typing(
NpStrict1DArrayComplexLongDouble = np_array_pydantic_annotated_typing(
data_type=np.clongdouble, dimensions=1, strict_data_typing=True
)
NpStrict1DArrayComplex128 = np_array_pydantic_annotated_typing(
Expand Down Expand Up @@ -48,11 +50,11 @@
"NpStrict1DArrayUint32",
"NpStrict1DArrayUint16",
"NpStrict1DArrayUint8",
"NpStrict1DArrayFp128",
"NpStrict1DArrayFpLongDouble",
"NpStrict1DArrayFp64",
"NpStrict1DArrayFp32",
"NpStrict1DArrayFp16",
"NpStrict1DArrayComplex256",
"NpStrict1DArrayComplexLongDouble",
"NpStrict1DArrayComplex128",
"NpStrict1DArrayComplex64",
"NpStrict1DArrayBool",
Expand Down
8 changes: 4 additions & 4 deletions pydantic_numpy/typing/strict_data_type/ii_dimensional.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@
NpStrict2DArrayUint16 = np_array_pydantic_annotated_typing(data_type=np.uint16, dimensions=2, strict_data_typing=True)
NpStrict2DArrayUint8 = np_array_pydantic_annotated_typing(data_type=np.uint8, dimensions=2, strict_data_typing=True)

NpStrict2DArrayFp128 = np_array_pydantic_annotated_typing(
NpStrict2DArrayFpLongDouble = np_array_pydantic_annotated_typing(
data_type=np.longdouble, dimensions=2, strict_data_typing=True
)
NpStrict2DArrayFp64 = np_array_pydantic_annotated_typing(data_type=np.float64, dimensions=2, strict_data_typing=True)
NpStrict2DArrayFp32 = np_array_pydantic_annotated_typing(data_type=np.float32, dimensions=2, strict_data_typing=True)
NpStrict2DArrayFp16 = np_array_pydantic_annotated_typing(data_type=np.float16, dimensions=2, strict_data_typing=True)

NpStrict2DArrayComplex256 = np_array_pydantic_annotated_typing(
NpStrict2DArrayComplexLongDouble = np_array_pydantic_annotated_typing(
data_type=np.clongdouble, dimensions=2, strict_data_typing=True
)
NpStrict2DArrayComplex128 = np_array_pydantic_annotated_typing(
Expand Down Expand Up @@ -50,11 +50,11 @@
"NpStrict2DArrayUint32",
"NpStrict2DArrayUint16",
"NpStrict2DArrayUint8",
"NpStrict2DArrayFp128",
"NpStrict2DArrayFpLongDouble",
"NpStrict2DArrayFp64",
"NpStrict2DArrayFp32",
"NpStrict2DArrayFp16",
"NpStrict2DArrayComplex256",
"NpStrict2DArrayComplexLongDouble",
"NpStrict2DArrayComplex128",
"NpStrict2DArrayComplex64",
"NpStrict2DArrayBool",
Expand Down
8 changes: 4 additions & 4 deletions pydantic_numpy/typing/strict_data_type/iii_dimensional.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@
NpStrict3DArrayUint16 = np_array_pydantic_annotated_typing(data_type=np.uint16, dimensions=3, strict_data_typing=True)
NpStrict3DArrayUint8 = np_array_pydantic_annotated_typing(data_type=np.uint8, dimensions=3, strict_data_typing=True)

NpStrict3DArrayFp128 = np_array_pydantic_annotated_typing(
NpStrict3DArrayFpLongDouble = np_array_pydantic_annotated_typing(
data_type=np.longdouble, dimensions=3, strict_data_typing=True
)
NpStrict3DArrayFp64 = np_array_pydantic_annotated_typing(data_type=np.float64, dimensions=3, strict_data_typing=True)
NpStrict3DArrayFp32 = np_array_pydantic_annotated_typing(data_type=np.float32, dimensions=3, strict_data_typing=True)
NpStrict3DArrayFp16 = np_array_pydantic_annotated_typing(data_type=np.float16, dimensions=3, strict_data_typing=True)

NpStrict3DArrayComplex256 = np_array_pydantic_annotated_typing(
NpStrict3DArrayComplexLongDouble = np_array_pydantic_annotated_typing(
data_type=np.clongdouble, dimensions=3, strict_data_typing=True
)
NpStrict3DArrayComplex128 = np_array_pydantic_annotated_typing(
Expand Down Expand Up @@ -49,11 +49,11 @@
"NpStrict3DArrayUint32",
"NpStrict3DArrayUint16",
"NpStrict3DArrayUint8",
"NpStrict3DArrayFp128",
"NpStrict3DArrayFpLongDouble",
"NpStrict3DArrayFp64",
"NpStrict3DArrayFp32",
"NpStrict3DArrayFp16",
"NpStrict3DArrayComplex256",
"NpStrict3DArrayComplexLongDouble",
"NpStrict3DArrayComplex128",
"NpStrict3DArrayComplex64",
"NpStrict3DArrayBool",
Expand Down
8 changes: 4 additions & 4 deletions pydantic_numpy/typing/strict_data_type/n_dimensional.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@
NpStrictNDArrayUint16 = np_array_pydantic_annotated_typing(data_type=np.uint16, strict_data_typing=True)
NpStrictNDArrayUint8 = np_array_pydantic_annotated_typing(data_type=np.uint8, strict_data_typing=True)

NpStrictNDArrayFp128 = np_array_pydantic_annotated_typing(data_type=np.longdouble, strict_data_typing=True)
NpStrictNDArrayFpLongDouble = np_array_pydantic_annotated_typing(data_type=np.longdouble, strict_data_typing=True)
NpStrictNDArrayFp64 = np_array_pydantic_annotated_typing(data_type=np.float64, strict_data_typing=True)
NpStrictNDArrayFp32 = np_array_pydantic_annotated_typing(data_type=np.float32, strict_data_typing=True)
NpStrictNDArrayFp16 = np_array_pydantic_annotated_typing(data_type=np.float16, strict_data_typing=True)

NpStrictNDArrayComplex256 = np_array_pydantic_annotated_typing(data_type=np.clongdouble, strict_data_typing=True)
NpStrictNDArrayComplexLongDouble = np_array_pydantic_annotated_typing(data_type=np.clongdouble, strict_data_typing=True)
NpStrictNDArrayComplex128 = np_array_pydantic_annotated_typing(data_type=np.complex128, strict_data_typing=True)
NpStrictNDArrayComplex64 = np_array_pydantic_annotated_typing(data_type=np.complex64, strict_data_typing=True)

Expand All @@ -38,11 +38,11 @@
"NpStrictNDArrayUint32",
"NpStrictNDArrayUint16",
"NpStrictNDArrayUint8",
"NpStrictNDArrayFp128",
"NpStrictNDArrayFpLongDouble",
"NpStrictNDArrayFp64",
"NpStrictNDArrayFp32",
"NpStrictNDArrayFp16",
"NpStrictNDArrayComplex256",
"NpStrictNDArrayComplexLongDouble",
"NpStrictNDArrayComplex128",
"NpStrictNDArrayComplex64",
"NpStrictNDArrayBool",
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "pydantic_numpy"
version = "3.1.3"
version = "3.1.4"
description = "Pydantic Model integration of the NumPy array"
authors = ["Can H. Tartanoglu", "Christoph Heindl"]
maintainers = ["Can H. Tartanoglu <[email protected]>"]
Expand Down
32 changes: 16 additions & 16 deletions tests/helper/groups.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@
(np.uint32, Np1DArrayUint32, 1),
(np.uint16, Np1DArrayUint16, 1),
(np.uint8, Np1DArrayUint8, 1),
(np.longdouble, Np1DArrayFp128, 1),
(np.longdouble, Np1DArrayFpLongDouble, 1),
(np.float64, Np1DArrayFp64, 1),
(np.float32, Np1DArrayFp32, 1),
(np.float16, Np1DArrayFp16, 1),
(np.clongdouble, Np1DArrayComplex256, 1),
(np.clongdouble, Np1DArrayComplexLongDouble, 1),
(np.complex128, Np1DArrayComplex128, 1),
(np.complex64, Np1DArrayComplex64, 1),
(bool, Np1DArrayBool, 1),
Expand All @@ -51,11 +51,11 @@
(np.uint32, Np2DArrayUint32, 2),
(np.uint16, Np2DArrayUint16, 2),
(np.uint8, Np2DArrayUint8, 2),
(np.longdouble, Np2DArrayFp128, 2),
(np.longdouble, Np2DArrayFpLongDouble, 2),
(np.float64, Np2DArrayFp64, 2),
(np.float32, Np2DArrayFp32, 2),
(np.float16, Np2DArrayFp16, 2),
(np.clongdouble, Np2DArrayComplex256, 2),
(np.clongdouble, Np2DArrayComplexLongDouble, 2),
(np.complex128, Np2DArrayComplex128, 2),
(np.complex64, Np2DArrayComplex64, 2),
(bool, Np2DArrayBool, 2),
Expand All @@ -71,11 +71,11 @@
(np.uint32, Np3DArrayUint32, 3),
(np.uint16, Np3DArrayUint16, 3),
(np.uint8, Np3DArrayUint8, 3),
(np.longdouble, Np3DArrayFp128, 3),
(np.longdouble, Np3DArrayFpLongDouble, 3),
(np.float64, Np3DArrayFp64, 3),
(np.float32, Np3DArrayFp32, 3),
(np.float16, Np3DArrayFp16, 3),
(np.clongdouble, Np3DArrayComplex256, 3),
(np.clongdouble, Np3DArrayComplexLongDouble, 3),
(np.complex128, Np3DArrayComplex128, 3),
(np.complex64, Np3DArrayComplex64, 3),
(bool, Np3DArrayBool, 3),
Expand All @@ -91,11 +91,11 @@
(np.uint32, NpNDArrayUint32, None),
(np.uint16, NpNDArrayUint16, None),
(np.uint8, NpNDArrayUint8, None),
(np.longdouble, NpNDArrayFp128, None),
(np.longdouble, NpNDArrayFpLongDouble, None),
(np.float64, NpNDArrayFp64, None),
(np.float32, NpNDArrayFp32, None),
(np.float16, NpNDArrayFp16, None),
(np.clongdouble, NpNDArrayComplex256, None),
(np.clongdouble, NpNDArrayComplexLongDouble, None),
(np.complex128, NpNDArrayComplex128, None),
(np.complex64, NpNDArrayComplex64, None),
(bool, NpNDArrayBool, None),
Expand All @@ -120,11 +120,11 @@
(np.uint32, NpStrict1DArrayUint32, 1),
(np.uint16, NpStrict1DArrayUint16, 1),
(np.uint8, NpStrict1DArrayUint8, 1),
(np.longdouble, NpStrict1DArrayFp128, 1),
(np.longdouble, NpStrict1DArrayFpLongDouble, 1),
(np.float64, NpStrict1DArrayFp64, 1),
(np.float32, NpStrict1DArrayFp32, 1),
(np.float16, NpStrict1DArrayFp16, 1),
(np.clongdouble, NpStrict1DArrayComplex256, 1),
(np.clongdouble, NpStrict1DArrayComplexLongDouble, 1),
(np.complex128, NpStrict1DArrayComplex128, 1),
(np.complex64, NpStrict1DArrayComplex64, 1),
(bool, NpStrict1DArrayBool, 1),
Expand All @@ -140,11 +140,11 @@
(np.uint32, NpStrict2DArrayUint32, 2),
(np.uint16, NpStrict2DArrayUint16, 2),
(np.uint8, NpStrict2DArrayUint8, 2),
(np.longdouble, NpStrict2DArrayFp128, 2),
(np.longdouble, NpStrict2DArrayFpLongDouble, 2),
(np.float64, NpStrict2DArrayFp64, 2),
(np.float32, NpStrict2DArrayFp32, 2),
(np.float16, NpStrict2DArrayFp16, 2),
(np.clongdouble, NpStrict2DArrayComplex256, 2),
(np.clongdouble, NpStrict2DArrayComplexLongDouble, 2),
(np.complex128, NpStrict2DArrayComplex128, 2),
(np.complex64, NpStrict2DArrayComplex64, 2),
(bool, NpStrict2DArrayBool, 2),
Expand All @@ -160,11 +160,11 @@
(np.uint32, NpStrict3DArrayUint32, 3),
(np.uint16, NpStrict3DArrayUint16, 3),
(np.uint8, NpStrict3DArrayUint8, 3),
(np.longdouble, NpStrict3DArrayFp128, 3),
(np.longdouble, NpStrict3DArrayFpLongDouble, 3),
(np.float64, NpStrict3DArrayFp64, 3),
(np.float32, NpStrict3DArrayFp32, 3),
(np.float16, NpStrict3DArrayFp16, 3),
(np.clongdouble, NpStrict3DArrayComplex256, 3),
(np.clongdouble, NpStrict3DArrayComplexLongDouble, 3),
(np.complex128, NpStrict3DArrayComplex128, 3),
(np.complex64, NpStrict3DArrayComplex64, 3),
(bool, NpStrict3DArrayBool, 3),
Expand All @@ -180,11 +180,11 @@
(np.uint32, NpStrictNDArrayUint32, None),
(np.uint16, NpStrictNDArrayUint16, None),
(np.uint8, NpStrictNDArrayUint8, None),
(np.longdouble, NpStrictNDArrayFp128, None),
(np.longdouble, NpStrictNDArrayFpLongDouble, None),
(np.float64, NpStrictNDArrayFp64, None),
(np.float32, NpStrictNDArrayFp32, None),
(np.float16, NpStrictNDArrayFp16, None),
(np.clongdouble, NpStrictNDArrayComplex256, None),
(np.clongdouble, NpStrictNDArrayComplexLongDouble, None),
(np.complex128, NpStrictNDArrayComplex128, None),
(np.complex64, NpStrictNDArrayComplex64, None),
(bool, NpStrictNDArrayBool, None),
Expand Down

0 comments on commit 1138230

Please sign in to comment.