shape
ErrorsCollection

shape

Synthesised documentation from type/Array

From type/Array

See Original text in context

method shape() { (*,) }

Returns the shape of the array as a list.

Example:

my @foo[2;3= ( < 1 2 3 >, < 4 5 6 > ); # Array with fixed dimensions 
say @foo.shape;                          # OUTPUT: «(2 3)␤» 
my @bar = ( < 1 2 3 >, < 4 5 6 > );      # Normal array (of arrays) 
say @bar.shape;                          # OUTPUT: «(*)␤»