|
1 |
| -from typing import TypeAlias |
| 1 | +from typing import Any, TypeAlias |
2 | 2 |
|
3 | 3 | import numpy as np
|
4 | 4 |
|
@@ -37,32 +37,32 @@ __all__ = [
|
37 | 37 | # See https://github.com/numpy/numtype/issues/366 for the scalar promotion table and
|
38 | 38 | # https://numpy.org/neps/nep-0050-scalar-promotion.html for the official specification.
|
39 | 39 |
|
40 |
| -co_integer8: TypeAlias = integer8 | np.bool |
41 |
| -co_integer16: TypeAlias = integer16 | co_integer8 |
42 |
| -co_integer32: TypeAlias = integer32 | co_integer16 |
43 |
| -co_integer64: TypeAlias = np.integer | np.bool |
44 |
| -co_integer = co_integer64 |
45 |
| - |
46 | 40 | co_int8: TypeAlias = np.int8 | np.bool
|
47 | 41 | co_int16: TypeAlias = np.int16 | co_integer8
|
48 | 42 | co_int32: TypeAlias = np.int32 | co_integer16
|
49 | 43 | co_long: TypeAlias = np.long | co_int32
|
50 |
| -co_int64: TypeAlias = np.signedinteger | co_integer32 |
| 44 | +co_int64: TypeAlias = np.signedinteger[Any] | co_integer32 |
51 | 45 |
|
52 | 46 | co_uint8: TypeAlias = np.uint8 | np.bool
|
53 | 47 | co_uint16: TypeAlias = np.uint16 | co_uint8
|
54 | 48 | co_uint32: TypeAlias = np.uint32 | co_uint16
|
55 | 49 | co_ulong: TypeAlias = np.ulong | co_uint32
|
56 |
| -co_uint64: TypeAlias = np.unsignedinteger | np.bool |
| 50 | +co_uint64: TypeAlias = np.unsignedinteger[Any] | np.bool |
| 51 | + |
| 52 | +co_integer8: TypeAlias = integer8 | np.bool |
| 53 | +co_integer16: TypeAlias = integer16 | co_integer8 |
| 54 | +co_integer32: TypeAlias = integer32 | co_integer16 |
| 55 | +co_integer64: TypeAlias = np.integer[Any] | np.bool |
| 56 | +co_integer = co_integer64 |
57 | 57 |
|
58 | 58 | co_float16: TypeAlias = np.float16 | co_integer8
|
59 | 59 | co_float32: TypeAlias = np.float32 | np.float16 | co_integer16
|
60 | 60 | co_float64: TypeAlias = np.float64 | np.float32 | np.float16 | co_integer64
|
61 |
| -co_float: TypeAlias = np.floating | co_integer |
| 61 | +co_float: TypeAlias = np.floating[Any] | co_integer |
62 | 62 |
|
63 | 63 | co_complex64: TypeAlias = inexact32 | number16 | integer8
|
64 | 64 | co_complex128: TypeAlias = number64 | number32 | number16 | co_integer
|
65 |
| -co_complex: TypeAlias = np.number | np.bool |
| 65 | +co_complex: TypeAlias = np.number[Any] | np.bool |
66 | 66 | co_number = co_complex
|
67 | 67 |
|
68 | 68 | co_timedelta: TypeAlias = np.timedelta64 | co_integer
|
|
0 commit comments