timholy / Grid.jl

Interpolation and related operations on grids
MIT License
47 stars 26 forks source link

Breaking change: indexing with vectors #6

Closed timholy closed 11 years ago

timholy commented 11 years ago

There turns out to be an API problem with Grid, due to some foolishness on my part. Given a two-dimensional InterpGrid object A, one can do interpolation with A[x,y]. However, because of Counter, I also allowed a syntax A[c] where c is the two-vector [x,y]. This, of course, violates all expectations of how a vectorized getindex should work. My intention is to change this so that it's much more in line with the rest of Julia. However, if you're using this feature it will be a breaking change, with no graceful deprecation that I see (because you want to allow a one-dimensional InterpGrid object to support A[v]).

InterpGrid will also become of a subtype of AbstractArray and have a number of other changes in its declaration that mesh better with the rest of Julia.

timholy commented 11 years ago

Fixed via 6fd9faa3a38b8b850dbdb8bba7e3c312b6ee9016