Error: [lapp] cannot use 'fun'. The number of values returned is less than the number of input cells.
(returning: 1, expecting: 6037)
Perhaps the function is not properly vectorized