Next: , Previous: Mapping, Up: Mapping


4.3.5.1 elementwise

— Function: grid:elementwise function &optional toggle-physical-dimension

Make a function on a grid as an elementwise map of a scalar function. If the result has no physical dimension but the argument does, or vice versa, toggle-physical-dimension should be T.

          (funcall (grid:elementwise 'sqrt) #(1.0d0 2.0d0 3.0d0 4.0d0))
          #(1.0 1.4142135623730951 1.7320508075688772 2.0)