From 633af182f49336296d55045fb89d3f9a3c247d71 Mon Sep 17 00:00:00 2001 From: Jactus Date: Mon, 9 Nov 2020 22:15:41 +0800 Subject: [PATCH] Fix read_bin bug --- qlib/utils/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qlib/utils/__init__.py b/qlib/utils/__init__.py index d0b47d3cd..900d9e115 100644 --- a/qlib/utils/__init__.py +++ b/qlib/utils/__init__.py @@ -44,7 +44,7 @@ def read_bin(file_path, start_index, end_index): ref_start_index = int(np.frombuffer(f.read(4), dtype=" 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