summaryrefslogtreecommitdiff
path: root/numpy/typing/_nbit.py
diff options
context:
space:
mode:
authorBas van Beek <b.f.van.beek@vu.nl>2020-11-16 19:08:49 +0100
committerBas van Beek <b.f.van.beek@vu.nl>2020-12-22 17:24:04 +0100
commita5285349805c5e794700a3dfcb378b391c53b0c8 (patch)
treeeee7a23363f45fe9c185230d3c854fc7e91a12a0 /numpy/typing/_nbit.py
parente3f288ed51e292af99368eae2d5725772666d923 (diff)
downloadnumpy-a5285349805c5e794700a3dfcb378b391c53b0c8.tar.gz
ENH: Added a mypy plugin for handling platform-specific `np.number` precisions
Diffstat (limited to 'numpy/typing/_nbit.py')
-rw-r--r--numpy/typing/_nbit.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/numpy/typing/_nbit.py b/numpy/typing/_nbit.py
new file mode 100644
index 000000000..b8d35db4f
--- /dev/null
+++ b/numpy/typing/_nbit.py
@@ -0,0 +1,16 @@
+"""A module with the precisions of platform-specific `~numpy.number`s."""
+
+from typing import Any
+
+# To-be replaced with a `npt.NBitBase` subclass by numpy's mypy plugin
+_NBitByte = Any
+_NBitShort = Any
+_NBitIntC = Any
+_NBitIntP = Any
+_NBitInt = Any
+_NBitLongLong = Any
+
+_NBitHalf = Any
+_NBitSingle = Any
+_NBitDouble = Any
+_NBitLongDouble = Any