| 1236 | |
| 1237 | |
| 1238 | def xnumpy_load(filepath_or_buffer, *args, download_config: Optional[DownloadConfig] = None, **kwargs): |
| 1239 | import numpy as np |
| 1240 | |
| 1241 | if hasattr(filepath_or_buffer, "read"): |
| 1242 | return np.load(filepath_or_buffer, *args, **kwargs) |
| 1243 | else: |
| 1244 | filepath_or_buffer = str(filepath_or_buffer) |
| 1245 | return np.load(xopen(filepath_or_buffer, "rb", download_config=download_config), *args, **kwargs) |
| 1246 | |
| 1247 | |
| 1248 | def xpandas_read_csv(filepath_or_buffer, download_config: Optional[DownloadConfig] = None, **kwargs): |