Yes I think you are right about that. Using a comprehension is just as good
for my case. But part of me would like to just finally understand that part
of Julia! Ok will have to wait for the next opportunity. :-)
Thanks anyway.
Florian
On Saturday, 15 October 2016, Erik Schnetter wrote:
> A gen
A generated function is only useful if you perform a non-trivial
calculation based on the argument types. You don't do that here, so I
wonder whether simply using the Cartesian indexing macros by themselves
would be sufficient.
Note also that you don't need to write `$N` in your code; using `N`
di
hi all,
I want to evaluate a function at each index of an array. There is a N
dimensional function, and I want to map it onto an N-dimensional array:
fpoly(x::Array{Real,5}) = x[1] + x[2]^2 + x[3] + x[4]^2 + x[5]
want to do
a = rand(2,2,2,2,2);
b = similar(a)
for i1 in indices(a,1)
for i2