mirror of
https://github.com/microsoft/qlib.git
synced 2026-07-04 03:21:00 +08:00
Fix read_bin bug
This commit is contained in:
@@ -44,7 +44,7 @@ def read_bin(file_path, start_index, end_index):
|
||||
ref_start_index = int(np.frombuffer(f.read(4), dtype="<f")[0])
|
||||
si = max(ref_start_index, start_index)
|
||||
if si > end_index:
|
||||
return pd.Series(np.float32)
|
||||
return pd.Series(dtype=np.float32)
|
||||
# calculate offset
|
||||
f.seek(4 * (si - ref_start_index) + 4)
|
||||
# read nbytes
|
||||
|
||||
Reference in New Issue
Block a user