The example on the official website has an error


#1

class MultiIter:
def init(self, iter_list):
self.iters = iter_list
def next(self):
batches = [i.next() for i in self.iters]
return DataBatch(data=[*b.data for b in batches],
label=[*b.label for b in batches])
def reset(self):
for i in self.iters:
i.reset()
@property
def provide_data(self):
return [*i.provide_data for i in self.iters]
@property
def provide_label(self):
return [*i.provide_label for i in self.iters]

iter = MultiIter([mx.io.ImageRecordIter(‘image.rec’), mx.io.CSVIter(‘txt.csv’)])

the error:iterable unpacking cannot be used in comprehension
how to fix it?