Skip to content

Commit

Permalink
Update qlib/utils/index_data.py
Browse files Browse the repository at this point in the history
  • Loading branch information
you-n-g authored Jun 23, 2024
1 parent 3bfc5a4 commit cd7e3fd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion qlib/utils/index_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,8 @@ def _convert_type(self, item):
elif isinstance(item, np.datetime64):
# This happens often when creating index based on np.datetime64 and query with another precision
return item.astype(self.idx_list.dtype)

# NOTE: It is hard to consider every cases at first.
# We just try to cover part of cases to make it more user-friendly
return item

def index(self, item) -> int:
Expand Down

0 comments on commit cd7e3fd

Please sign in to comment.