1
0
mirror of https://github.com/microsoft/qlib.git synced 2026-06-06 05:51:17 +08:00

fix: incorrect index implementation in FileCalendarStorage (#2195)

This commit is contained in:
Srujan Rana
2026-04-21 11:23:18 +05:30
committed by GitHub
parent 2c21b8089a
commit 7ccf3f7658

View File

@@ -156,7 +156,7 @@ class FileCalendarStorage(FileStorageMixin, CalendarStorage):
def index(self, value: CalVT) -> int:
self.check()
calendar = self._read_calendar()
return int(np.argwhere(calendar == value)[0])
return calendar.index(value)
def insert(self, index: int, value: CalVT):
calendar = self._read_calendar()