pwtools.parse.axis_lens¶
- pwtools.parse.axis_lens(seq, axis=0)[source]¶
Return length of axis of all arrays in seq.
If an entry in seq is None instead of an array, return 0. All arrays must have at least axis+1 dimensions, of course (i.e. axis=1 -> all arrays at least 2d).
Examples
>>> axis_lens([arange(100), np.array([1,2,3]), None, rand(5,3)]) [100, 3, 0, 5]