How did you pass the numpy arrays to the DataLoader?
Did you get the expected batches for both, the data and target?
I would personally see it as a bit of a hack, if that’s working.
This simple example won’t throw an error, but doesn’t yield the expected results:
data, target = np.zeros((100, 1)), np.ones((100, 1))
loader_np = DataLoader((data, target), batch_size=1)
for x in loader_np:
    print(x.shape)
    print(type(x))
    print(x)