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.

15 lines
380 B

6 months ago
  1. import sys
  2. from typing import Sequence, Tuple, Union, Any
  3. if sys.version_info >= (3, 8):
  4. from typing import SupportsIndex
  5. else:
  6. try:
  7. from typing_extensions import SupportsIndex
  8. except ImportError:
  9. SupportsIndex = Any
  10. _Shape = Tuple[int, ...]
  11. # Anything that can be coerced to a shape tuple
  12. _ShapeLike = Union[SupportsIndex, Sequence[SupportsIndex]]