loader.py 663 B

1234567891011121314151617181920212223
  1. import os
  2. import numpy as np
  3. import pandas as pd
  4. __all__ = ["BaseLoader"]
  5. class BaseLoader:
  6. def __init__(self, path: "str"):
  7. self.have: "np.ndarray" = np.array([])
  8. self.test: "np.ndarray" = np.array([])
  9. self.none: "np.ndarray" = np.array([])
  10. self._load(path)
  11. def _load(self, path: "str") -> "None":
  12. raise NotImplementedError("you should implement func: `_load(path)`.")
  13. def toh(self, file: "str") -> "None":
  14. raise NotImplementedError("you should implement func: `toh(file)`.")
  15. def toc(self, file: "str") -> "None":
  16. raise NotImplementedError("you should implement func: `toc(file)`.")