format.pyi 879 B

12345678910111213141516171819202122232425262728
  1. import sys
  2. from typing import Any, List, Set
  3. if sys.version_info >= (3, 8):
  4. from typing import Literal, Final
  5. else:
  6. from typing_extensions import Literal, Final
  7. __all__: List[str]
  8. EXPECTED_KEYS: Final[Set[str]]
  9. MAGIC_PREFIX: Final[bytes]
  10. MAGIC_LEN: Literal[8]
  11. ARRAY_ALIGN: Literal[64]
  12. BUFFER_SIZE: Literal[262144] # 2**18
  13. def magic(major, minor): ...
  14. def read_magic(fp): ...
  15. def dtype_to_descr(dtype): ...
  16. def descr_to_dtype(descr): ...
  17. def header_data_from_array_1_0(array): ...
  18. def write_array_header_1_0(fp, d): ...
  19. def write_array_header_2_0(fp, d): ...
  20. def read_array_header_1_0(fp): ...
  21. def read_array_header_2_0(fp): ...
  22. def write_array(fp, array, version=..., allow_pickle=..., pickle_kwargs=...): ...
  23. def read_array(fp, allow_pickle=..., pickle_kwargs=...): ...
  24. def open_memmap(filename, mode=..., dtype=..., shape=..., fortran_order=..., version=...): ...