MCPcopy Create free account
hub / github.com/TrustAIResearch/MLHospital / __init__

Method __init__

mlh/data_preprocessing/data_loader.py:417–419  ·  view source on GitHub ↗
(self, dataset, indices=None)

Source from the content-addressed store, hash-verified

415
416class IndicesDataset:
417 def __init__(self, dataset, indices=None):
418 self.dataset = dataset
419 self.indices = range(len(dataset)) if (indices is None) else indices
420
421 def __getitem__(self, i):
422 return self.dataset[self.indices[i]]

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected