Here is the simplest way I can think of doing what you want:
class ArrayItemList(ItemList):
@classmethod
def from_numpy(cls, numpy_array):
return cls(items=numpy_array)
def label_from_array(self, array, label_cls=None, **kwargs):
return self._label_from_list(array,label_cls=label_cls,**kwargs)
x = np.random.rand(50,224,224)
y = np.random.rand(50)
data = (ArrayItemList.from_numpy(x)
.split_none()
.label_from_array(y)
.databunch(bs=10))