_extended_precision.py 777 B

123456789101112131415161718192021222324252627
  1. """A module with platform-specific extended precision
  2. `numpy.number` subclasses.
  3. The subclasses are defined here (instead of ``__init__.pyi``) such
  4. that they can be imported conditionally via the numpy's mypy plugin.
  5. """
  6. import numpy as np
  7. from . import (
  8. _80Bit,
  9. _96Bit,
  10. _128Bit,
  11. _256Bit,
  12. )
  13. uint128 = np.unsignedinteger[_128Bit]
  14. uint256 = np.unsignedinteger[_256Bit]
  15. int128 = np.signedinteger[_128Bit]
  16. int256 = np.signedinteger[_256Bit]
  17. float80 = np.floating[_80Bit]
  18. float96 = np.floating[_96Bit]
  19. float128 = np.floating[_128Bit]
  20. float256 = np.floating[_256Bit]
  21. complex160 = np.complexfloating[_80Bit, _80Bit]
  22. complex192 = np.complexfloating[_96Bit, _96Bit]
  23. complex256 = np.complexfloating[_128Bit, _128Bit]
  24. complex512 = np.complexfloating[_256Bit, _256Bit]