|
14 | 14 | from ._domains._array import Array |
15 | 15 | from ._polys._poly import Poly |
16 | 16 |
|
17 | | -ElementLike = Union[int, str, "Array"] |
| 17 | +ElementLike = Union[ |
| 18 | + int, |
| 19 | + str, |
| 20 | + "Array", |
| 21 | +] |
18 | 22 | """ |
19 | 23 | A :obj:`~typing.Union` representing objects that can be coerced into a Galois field element. |
20 | 24 |
|
|
60 | 64 | """ |
61 | 65 |
|
62 | 66 |
|
63 | | -IterableLike = Union[Sequence[ElementLike], Sequence["IterableLike"]] |
| 67 | +IterableLike = Union[ |
| 68 | + Sequence[ElementLike], |
| 69 | + Sequence["IterableLike"], |
| 70 | + np.ndarray, |
| 71 | +] |
64 | 72 | """ |
65 | 73 | A :obj:`~typing.Union` representing iterable objects that can be coerced into a Galois field array. |
66 | 74 |
|
|
86 | 94 | # Mix and match integers and strings |
87 | 95 | GF([["x^2 + 2x + 2", 4], ["x^4 + 2x^3 + x^2 + x + 1", 205]]) |
88 | 96 |
|
| 97 | +- :obj:`~numpy.ndarray`: A NumPy array of integers, representing finite field elements in their :ref:`integer |
| 98 | + representation <int-repr>`. |
| 99 | +
|
| 100 | + .. ipython-with-reprs:: int,poly,power |
| 101 | +
|
| 102 | + x = np.array([[17, 4], [148, 205]]); x |
| 103 | + GF(x) |
| 104 | +
|
89 | 105 | .. rubric:: Alias |
90 | 106 | """ |
91 | 107 |
|
92 | 108 |
|
93 | | -ArrayLike = Union[IterableLike, np.ndarray, "Array"] |
| 109 | +ArrayLike = Union[ |
| 110 | + IterableLike, |
| 111 | + np.ndarray, |
| 112 | + "Array", |
| 113 | +] |
94 | 114 | """ |
95 | 115 | A :obj:`~typing.Union` representing objects that can be coerced into a Galois field array. |
96 | 116 |
|
|
121 | 141 | """ |
122 | 142 |
|
123 | 143 |
|
124 | | -ShapeLike = Union[int, Sequence[int]] |
| 144 | +ShapeLike = Union[ |
| 145 | + int, |
| 146 | + Sequence[int], |
| 147 | +] |
125 | 148 | """ |
126 | 149 | A :obj:`~typing.Union` representing objects that can be coerced into a NumPy :obj:`~numpy.ndarray.shape` tuple. |
127 | 150 |
|
|
153 | 176 | """ |
154 | 177 |
|
155 | 178 |
|
156 | | -DTypeLike = Union[np.integer, int, str, object] |
| 179 | +DTypeLike = Union[ |
| 180 | + np.integer, |
| 181 | + int, |
| 182 | + str, |
| 183 | + object, |
| 184 | +] |
157 | 185 | """ |
158 | 186 | A :obj:`~typing.Union` representing objects that can be coerced into a NumPy data type. |
159 | 187 |
|
|
193 | 221 | """ |
194 | 222 |
|
195 | 223 |
|
196 | | -PolyLike = Union[int, str, ArrayLike, "Poly"] |
| 224 | +PolyLike = Union[ |
| 225 | + int, |
| 226 | + str, |
| 227 | + ArrayLike, |
| 228 | + "Poly", |
| 229 | +] |
197 | 230 | """ |
198 | 231 | A :obj:`~typing.Union` representing objects that can be coerced into a polynomial. |
199 | 232 |
|
|
0 commit comments