From 11ee76ed3dc0196b3b79a03de4fa1745fb4366a5 Mon Sep 17 00:00:00 2001 From: Huoran Li Date: Thu, 14 Jul 2022 13:44:13 +0800 Subject: [PATCH] . Revert file_storage change --- qlib/data/storage/file_storage.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/qlib/data/storage/file_storage.py b/qlib/data/storage/file_storage.py index cfac8d12b..faa3b404a 100644 --- a/qlib/data/storage/file_storage.py +++ b/qlib/data/storage/file_storage.py @@ -106,7 +106,10 @@ class FileCalendarStorage(FileStorageMixin, CalendarStorage): if not self.uri.exists(): self._write_calendar(values=[]) with self.uri.open("rb") as fp: - return [str(x) for x in np.loadtxt(fp, str, skiprows=skip_rows, max_rows=n_rows, encoding="utf-8")] + return [ + str(x) + for x in np.loadtxt(fp, str, skiprows=skip_rows, max_rows=n_rows, delimiter="\n", encoding="utf-8") + ] def _write_calendar(self, values: Iterable[CalVT], mode: str = "wb"): with self.uri.open(mode=mode) as fp: