In-place map of vector functions across slices of multidimensional arrays

If you are doing more general operations along different dimensions of multidimensional arrays, I think looping is a lot more powerful than trying to shoehorn it into broadcasting — especially using Julia’s CartesianIndex machinery to easily express loops over N-dimensional arrays in code that is generic for any N. For example, see this code for wave propagation in N dimensions.

3 Likes