x = randn(6, 4).
broadcast((x,tup) -> x * tup * tup, x, collect(Base.product(0:5, 0:3)))
But of course I’d like to do this without that
collect (and, eventually, in-place, overwriting
x) but this doesn’t work:
broadcast((x,tup) -> x * tup * tup, x, Base.product(0:5,0:3))
A friend tells me this is because iterators don’t know their own length, which makes sense since the error message involves not finding
getindex. Is there any way to make this computation fast without