flatten¶
Flattens some number of lower levels of some multilevel structures.
-
flatten
(din: Queue, *, lvl=1) → Queue[din.data, din.lvl-lvl]¶ If the input data type is a first level
Queue
, the eot information is stripped away and only the data is output:drv(t=Queue[Uint[4]], seq=[[0, 1, 2]]) \ | flatten \ | check(ref=[0, 1, 2])
If the input data type is a higher level
Queue
, the eot information for the lower levels is flattened:seq = [ [[0, 1], [10, 11]], [[100, 101], [110, 111]] ] ref = [ [0, 1, 10, 11], [100, 101, 110, 111] ] drv(t=Queue[Uint[8], 3], seq=[seq]) \ | flatten \ | check(ref=[ref])