Why don't you just write a set of nested "for" loops and iterate over
each element?  One of Julia's strengths is that "for" loops are fast,
so you don't need to worry about twisting your logic or your code
around in order to vectorize it as you do in Matlab or other such
languages.  If your logic is naturally expressed using "for" loops,
then write it out that way.

Stuart


On Sun, 31 Jan 2016, Omkar Patil wrote:

Hello,

I have a 3D array of float64 elements. And I need to average values of
neighbouring elements in a sphere for every element.
Map can run a function on every element. But how can send indices of
current element so that the function knows neighbouring elements for each
element.

I have just started studying Julia. Sorry for my naivety.

Thanks and regards,
Omkar



Reply via email to