MCPcopy Create free account
hub / github.com/Project-MONAI/MONAI / _compute_data_idx

Method _compute_data_idx

monai/data/dataset.py:1121–1130  ·  view source on GitHub ↗

Update the replacement data position in the total data.

(self)

Source from the content-addressed store, hash-verified

1119 warnings.warn(f"input data can't be shuffled in SmartCacheDataset with numpy.random.shuffle(): {e}.")
1120
1121 def _compute_data_idx(self) -> None:
1122 """
1123 Update the replacement data position in the total data.
1124
1125 """
1126 for i in range(self._replace_num):
1127 pos: int = self._start_pos + self.cache_num + i
1128 if pos >= self._total_num:
1129 pos -= self._total_num
1130 self._replace_data_idx[i] = pos
1131
1132 def is_started(self):
1133 """

Callers 3

__init__Method · 0.95
_try_update_cacheMethod · 0.95
_try_shutdownMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected