_nbit.py 632 B

12345678910111213141516171819
  1. """A module with the precisions of platform-specific `~numpy.number`s."""
  2. from typing import TypeAlias
  3. from ._nbit_base import _8Bit, _16Bit, _32Bit, _64Bit, _96Bit, _128Bit
  4. # To-be replaced with a `npt.NBitBase` subclass by numpy's mypy plugin
  5. _NBitByte: TypeAlias = _8Bit
  6. _NBitShort: TypeAlias = _16Bit
  7. _NBitIntC: TypeAlias = _32Bit
  8. _NBitIntP: TypeAlias = _32Bit | _64Bit
  9. _NBitInt: TypeAlias = _NBitIntP
  10. _NBitLong: TypeAlias = _32Bit | _64Bit
  11. _NBitLongLong: TypeAlias = _64Bit
  12. _NBitHalf: TypeAlias = _16Bit
  13. _NBitSingle: TypeAlias = _32Bit
  14. _NBitDouble: TypeAlias = _64Bit
  15. _NBitLongDouble: TypeAlias = _64Bit | _96Bit | _128Bit