1
0
mirror of https://github.com/microsoft/qlib.git synced 2026-07-12 23:36:54 +08:00

Checking dataset empty (#647)

* Checking dataset empty

* add dataset checker
This commit is contained in:
you-n-g
2021-10-14 23:35:12 +08:00
committed by GitHub
parent 9a175d7507
commit 334b92ace7
21 changed files with 47 additions and 0 deletions

View File

@@ -385,6 +385,10 @@ class TSDataSampler:
idx_map[real_idx] = (i, j)
return idx_df, idx_map
@property
def empty(self):
return self.__len__() == 0
def _get_indices(self, row: int, col: int) -> np.array:
"""
get series indices of self.data_arr from the row, col indices of self.idx_df