m2m模型翻译
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

42 lines
1.1 KiB

6 months ago
  1. """A module with platform-specific extended precision `numpy.number` subclasses.
  2. The subclasses are defined here (instead of ``__init__.pyi``) such
  3. that they can be imported conditionally via the numpy's mypy plugin.
  4. """
  5. from typing import TYPE_CHECKING, Any
  6. import numpy as np
  7. from . import (
  8. _80Bit,
  9. _96Bit,
  10. _128Bit,
  11. _256Bit,
  12. )
  13. if TYPE_CHECKING:
  14. uint128 = np.unsignedinteger[_128Bit]
  15. uint256 = np.unsignedinteger[_256Bit]
  16. int128 = np.signedinteger[_128Bit]
  17. int256 = np.signedinteger[_256Bit]
  18. float80 = np.floating[_80Bit]
  19. float96 = np.floating[_96Bit]
  20. float128 = np.floating[_128Bit]
  21. float256 = np.floating[_256Bit]
  22. complex160 = np.complexfloating[_80Bit, _80Bit]
  23. complex192 = np.complexfloating[_96Bit, _96Bit]
  24. complex256 = np.complexfloating[_128Bit, _128Bit]
  25. complex512 = np.complexfloating[_256Bit, _256Bit]
  26. else:
  27. uint128 = Any
  28. uint256 = Any
  29. int128 = Any
  30. int256 = Any
  31. float80 = Any
  32. float96 = Any
  33. float128 = Any
  34. float256 = Any
  35. complex160 = Any
  36. complex192 = Any
  37. complex256 = Any
  38. complex512 = Any