diff options
author | Aaron Meurer <asmeurer@gmail.com> | 2021-07-09 16:32:42 -0600 |
---|---|---|
committer | Aaron Meurer <asmeurer@gmail.com> | 2021-07-09 16:32:42 -0600 |
commit | 29974fba6810e1be7e8a2ba8322bd8c78a9012d0 (patch) | |
tree | d89fe92806f74e13cd96d16b2d4ff33c89810253 /numpy/_array_api | |
parent | c5999e2163f06bb9316dab03d0e1b2173e78bb65 (diff) | |
download | numpy-29974fba6810e1be7e8a2ba8322bd8c78a9012d0.tar.gz |
Use tuples for internal type lists in the array API
These are easier for type checkers to handle.
Diffstat (limited to 'numpy/_array_api')
-rw-r--r-- | numpy/_array_api/_dtypes.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/numpy/_array_api/_dtypes.py b/numpy/_array_api/_dtypes.py index c874763dd..1bec88c36 100644 --- a/numpy/_array_api/_dtypes.py +++ b/numpy/_array_api/_dtypes.py @@ -15,10 +15,10 @@ float64 = np.dtype('float64') # Note: This name is changed bool = np.dtype('bool') -_all_dtypes = [int8, int16, int32, int64, uint8, uint16, uint32, uint64, - float32, float64, bool] -_boolean_dtypes = [bool] -_floating_dtypes = [float32, float64] -_integer_dtypes = [int8, int16, int32, int64, uint8, uint16, uint32, uint64] -_integer_or_boolean_dtypes = [bool, int8, int16, int32, int64, uint8, uint16, uint32, uint64] -_numeric_dtypes = [float32, float64, int8, int16, int32, int64, uint8, uint16, uint32, uint64] +_all_dtypes = (int8, int16, int32, int64, uint8, uint16, uint32, uint64, + float32, float64, bool) +_boolean_dtypes = (bool) +_floating_dtypes = (float32, float64) +_integer_dtypes = (int8, int16, int32, int64, uint8, uint16, uint32, uint64) +_integer_or_boolean_dtypes = (bool, int8, int16, int32, int64, uint8, uint16, uint32, uint64) +_numeric_dtypes = (float32, float64, int8, int16, int32, int64, uint8, uint16, uint32, uint64) |