## ½ Shape of

One-argument form See also two-argument form Reshape

Enquires about the shape of each dimension of the data in the right-hand argument. See also ¦ (depth) to enquire about the depth of an array.

                 ½ 95 100 82 74 2        (A vector has 1 dimension, length.
           5                              This vector is 5 elements long.)

                 ½ 'SEA SCOUT'           (Counting the space, this vector is
           9                              9 elements long)
                 ½ 'SEA' 'SCOUT'         (Two element nested vector)
           2
                 TABLE                   (A matrix has two dimensions, height,
           1 3 5 7 9                      which is the number of rows, and
           2 4 6 8 0                      width, which is the number of
           8 6 4 2 1                      columns)
                 ½ TABLE
           3 5                           (This matrix has 3 rows and 5 columns)

                 ½ 501                   (A single number or letter is like a
                                          point. It has no dimensions so ½
                 ½½501                    displays no answer, i.e. It returns a
           0                              vector of size 0 - an empty vector. An empty
                                          vector, being a vector, has a size of 0)

Topic: APLX Help : Help on APL language : APL Primitives : ½ Shape of

[ Previous | Next | Contents | Index ]