Next: , Previous: diagonal, Up: Composition functions drop

— Function: grid:drop grid &key destination drop

Remove singleton axes (axes with dimension 1) if the argument drop is true; otherwise return the input grid unchanged. The destination is an optional pre-existing grid in which to write the result.

The function drop will remove singleton axes (axes with dimension one) and create a grid of lower rank than the original grid. For example, a two-dimensional of dimensions 5 x 1

     (test-grid-double-float 'array '(5 1))
     #2A((0.0d0) (10.0d0) (20.0d0) (30.0d0) (40.0d0))

will be converted to a vector (one dimensional array),

     (drop (test-grid-double-float 'array '(5 1)))
     #(0.0d0 10.0d0 20.0d0 30.0d0 40.0d0)