Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion qlib/data/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -671,7 +671,8 @@ def expression(self, instrument, field, start_time=None, end_time=None, freq="da
# Ensure that each column type is consistent
# FIXME: The stock data is currently float. If there is other types of data, this part needs to be re-implemented.
try:
series = series.astype(float)
# TODO: the default storage and calculation type should be configurable
series = series.astype(np.float32)
except ValueError:
pass
if not series.empty:
Expand Down