Lazily transpose dimensions 0 and 2 in iterator model
Lazily transpose dimensions 0 and 2 in iterator model Question: Given an iterable of an iterable of an iterable it_it_it (i.e. a lazy representation of 3d array) you can lazily transpose dimensions 0 and 1 by zip(*it_it_it) and dimensions 1 and 2 by map(lambda it_it: zip(*it_it), it_it_it). However, the last combination (0 and 2) is …