mirror of
https://github.com/microsoft/qlib.git
synced 2026-07-10 06:20:57 +08:00
support multi-freq uri
This commit is contained in:
@@ -43,8 +43,9 @@ def get_redis_connection():
|
||||
|
||||
|
||||
#################### Data ####################
|
||||
def read_bin(file_path, start_index, end_index):
|
||||
with open(file_path, "rb") as f:
|
||||
def read_bin(file_path: Union[str, Path], start_index, end_index):
|
||||
file_path = Path(file_path.expanduser().resolve())
|
||||
with file_path.open("rb") as f:
|
||||
# read start_index
|
||||
ref_start_index = int(np.frombuffer(f.read(4), dtype="<f")[0])
|
||||
si = max(ref_start_index, start_index)
|
||||
|
||||
Reference in New Issue
Block a user