The term "array-like" appears all over the sklearn documentation, and what that means is reasonably well defined here.
I have a situation where I have a dataset that will not fit in memory, but can be reasonably easily generated on-demand. As such, I would like to implement an "array-like" class that generates my data. However, it is not entirely clear what operations I should implement to make this work. Presumably I need __getitem__
. Possibly also next
and __iter__
. How does one create an "array-like" class in python?