npyio.pyi 628 B

12345678910111213141516171819202122232425
  1. import pathlib
  2. from typing import IO
  3. import numpy.typing as npt
  4. import numpy as np
  5. str_path: str
  6. bytes_path: bytes
  7. pathlib_path: pathlib.Path
  8. str_file: IO[str]
  9. AR_i8: npt.NDArray[np.int64]
  10. np.load(str_file) # E: incompatible type
  11. np.save(bytes_path, AR_i8) # E: No overload variant
  12. # https://github.com/python/mypy/issues/16111
  13. # np.save(str_path, AR_i8, fix_imports=True) # W: deprecated
  14. np.savez(bytes_path, AR_i8) # E: incompatible type
  15. np.savez_compressed(bytes_path, AR_i8) # E: incompatible type
  16. np.loadtxt(bytes_path) # E: incompatible type
  17. np.fromregex(bytes_path, ".", np.int64) # E: No overload variant