Skip to content

Commit

Permalink
pit rewrite does not need index
Browse files Browse the repository at this point in the history
  • Loading branch information
John Lyu committed Oct 26, 2023
1 parent d82ab8d commit 8702049
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions qlib/data/storage/storage.py
Original file line number Diff line number Diff line change
Expand Up @@ -574,7 +574,7 @@ def write(self, data_array: np.ndarray, index: int = None):
"""
raise NotImplementedError("Subclass of FeatureStorage must implement `write` method")

def rewrite(self, data: Union[List, np.ndarray, Tuple], index: int):
def rewrite(self, data: Union[List, np.ndarray, Tuple]):
"""overwrite all data in FeatureStorage with data
Parameters
Expand All @@ -585,7 +585,7 @@ def rewrite(self, data: Union[List, np.ndarray, Tuple], index: int):
data start index
"""
self.clear()
self.write(data, index)
self.write(data, 0)

def update(self, data_array: np.ndarray) -> None:
"""update data to storage, replace current data from start_date to end_date with given data_array
Expand Down

0 comments on commit 8702049

Please sign in to comment.