(cls, path: str, arr_name: str)
| 169 | |
| 170 | @classmethod |
| 171 | def load(cls, path: str, arr_name: str): |
| 172 | with open(path, "rb") as f: |
| 173 | arr = np.load(f)[arr_name] |
| 174 | return cls(arr) |
| 175 | |
| 176 | def read_batch(self, batch_size: int) -> Optional[np.ndarray]: |
| 177 | if self.idx >= self.arr.shape[0]: |