Open
Description
Like Python has built-in support for properties, it also has built-in functionality for indexable objects via getitem .
An example would be the get_data
function in for the dataloaders. We could try to design it in a way that the QMRIDataLoader is indexable (Pseudo-Code):
class QMRIDataLoader:
def __getitem__(self, id):
return self.item[0]
Then, later one, we could use it as
obj=QMRIDataLoader(...)
obj[0]
This would make it more 'pythonic' and consistent, for example, with how pytorch datasets are supposed to work.
Metadata
Metadata
Assignees
Labels
No labels