(self)
| 59 | return len(self.daily_count) |
| 60 | |
| 61 | def iter_batch(self): |
| 62 | if self.batch_size <= 0: |
| 63 | yield from self.iter_daily_shuffle() |
| 64 | return |
| 65 | |
| 66 | indices = np.arange(len(self.df_label)) |
| 67 | np.random.shuffle(indices) |
| 68 | |
| 69 | for i in range(len(indices))[::self.batch_size]: |
| 70 | if len(indices) - i < self.batch_size: |
| 71 | break |
| 72 | yield i, indices[i:i + self.batch_size] # NOTE: advanced indexing will cause copy |
| 73 | |
| 74 | def iter_daily_shuffle(self): |
| 75 | indices = np.arange(len(self.daily_count)) |
nothing calls this directly
no test coverage detected