Closed kellertuer closed 4 years ago
I haven't worked much with Cartesian indices but p[N,CartesianIndex(2,).I...]
does work.
I've opened a PR that makes broadcasting work but I'm not sure if there aren't any potential problems with that. Non-standard broadcasting sometimes has issues.
I haven't worked much with Cartesian indices but
p[N,CartesianIndex(2,).I...]
does work.
That is exactly what I am currently doing, or more precidely from an I = CartesianIndex(2,)
I do Tuple(I)...
. On the default setindex
it also worked directly with CartesianIndex
, I think it was converted somewhere.
Cartesian indices shouldn't work for setindex!
either. I've briefly looked at how they are treated in Julia Base and it's slightly convoluted so I'd prefer to leave it for now, especially since there is an easy workaround.
Currently in our version it does not, that's right. But yes the workaround exists and is only a few characters longer (Tuple(i)...
compared to just I
), so yes, we can close this.
I noticed that if you do
Then with the new mode the following works perfectly fine
But with broadcast or Cartesian indices
it does not yet.