Skip to content

Commit

Permalink
Support CartesianIndex indexing
Browse files Browse the repository at this point in the history
  • Loading branch information
timholy committed May 30, 2015
1 parent 4166845 commit 55a0a23
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/b-splines/indexing.jl
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,10 @@ end
getindex_impl(itp)
end

@generated function getindex{T,N}(itp::BSplineInterpolation{T,N}, index::CartesianIndex{N})
:(getindex(itp, $(Base.IteratorsMD.cartindex_exprs((index,), (:index,))...)))
end

offsetsym(off, d) = off == -1 ? symbol(string("ixm_", d)) :
off == 0 ? symbol(string("ix_", d)) :
off == 1 ? symbol(string("ixp_", d)) :
Expand Down

0 comments on commit 55a0a23

Please sign in to comment.