In Array§

See primary documentation in context for method shape

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: «(*)␤»