method shape

Documentation for method shape assembled from the following types:

class Array

From Array

(Array) method shape

Defined as:

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