Skip to content

Commit e846450

Browse files
author
Tomas Lycken
authored
Merge pull request #115 from tlycken/jl0.5
Fix warnings and errors on Julia 0.5 (replaces #113)
2 parents 042ee2e + 85ca4b6 commit e846450

File tree

21 files changed

+111
-99
lines changed

21 files changed

+111
-99
lines changed

REQUIRE

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@ julia 0.4
33
WoodburyMatrices 0.1.5
44
Ratios
55
AxisAlgorithms
6+
Compat 0.8.0

src/Interpolations.jl

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ export
3232
# extrapolation/extrapolation.jl
3333
# scaling/scaling.jl
3434

35+
using Compat
3536
using WoodburyMatrices, Ratios, AxisAlgorithms
3637

3738
import Base: convert, size, getindex, gradient, scale, promote_rule, ndims, eltype
@@ -71,16 +72,16 @@ ubounds{T,N}(itp::AbstractInterpolation{T,N}) = ntuple(i->ubound(itp,i), N)::NTu
7172
lbound{T,N}(itp::AbstractInterpolation{T,N}, d) = 1
7273
ubound{T,N}(itp::AbstractInterpolation{T,N}, d) = size(itp, d)
7374
itptype{T,N,IT<:DimSpec{InterpolationType},GT<:DimSpec{GridType}}(::Type{AbstractInterpolation{T,N,IT,GT}}) = IT
74-
itptype{ITP<:AbstractInterpolation}(::Type{ITP}) = itptype(super(ITP))
75+
itptype{ITP<:AbstractInterpolation}(::Type{ITP}) = itptype(supertype(ITP))
7576
itptype(itp::AbstractInterpolation ) = itptype(typeof(itp))
7677
gridtype{T,N,IT<:DimSpec{InterpolationType},GT<:DimSpec{GridType}}(::Type{AbstractInterpolation{T,N,IT,GT}}) = GT
77-
gridtype{ITP<:AbstractInterpolation}(::Type{ITP}) = gridtype(super(ITP))
78+
gridtype{ITP<:AbstractInterpolation}(::Type{ITP}) = gridtype(supertype(ITP))
7879
gridtype(itp::AbstractInterpolation) = gridtype(typeof(itp))
7980
ndims{T,N,IT<:DimSpec{InterpolationType},GT<:DimSpec{GridType}}(::Type{AbstractInterpolation{T,N,IT,GT}}) = N
80-
ndims{ITP<:AbstractInterpolation}(::Type{ITP}) = ndims(super(ITP))
81+
ndims{ITP<:AbstractInterpolation}(::Type{ITP}) = ndims(supertype(ITP))
8182
ndims(itp::AbstractInterpolation) = ndims(typeof(itp))
8283
eltype{T,N,IT<:DimSpec{InterpolationType},GT<:DimSpec{GridType}}(::Type{AbstractInterpolation{T,N,IT,GT}}) = T
83-
eltype{ITP<:AbstractInterpolation}(::Type{ITP}) = eltype(super(ITP))
84+
eltype{ITP<:AbstractInterpolation}(::Type{ITP}) = eltype(supertype(ITP))
8485
eltype(itp::AbstractInterpolation) = eltype(typeof(itp))
8586
count_interp_dims{T<:AbstractInterpolation}(::Type{T}, N) = N
8687

src/b-splines/b-splines.jl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ end
3232

3333
# Utilities for working either with scalars or tuples/tuple-types
3434
iextract{T<:BSpline}(::Type{T}, d) = T
35-
iextract{T<:GridType}(::Type{T}, d) = T
3635
iextract(t, d) = t.parameters[d]
3736
padding{T,N,TCoefs,IT,GT,pad}(::Type{BSplineInterpolation{T,N,TCoefs,IT,GT,pad}}) = pad
3837
padding(itp::AbstractInterpolation) = padding(typeof(itp))

src/b-splines/constant.jl

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Constant
1010
`define_indices_d` for a constant b-spline calculates `ix_d = round(Int,x_d)`
1111
"""
1212
function define_indices_d(::Type{BSpline{Constant}}, d, pad)
13-
symix, symx = symbol("ix_",d), symbol("x_",d)
13+
symix, symx = Symbol("ix_",d), Symbol("x_",d)
1414
:($symix = clamp(round(Int, $symx), 1, size(itp, $d)))
1515
end
1616

@@ -19,7 +19,7 @@ end
1919
with the general b-spline framework
2020
"""
2121
function coefficients(::Type{BSpline{Constant}}, N, d)
22-
sym, symx = symbol("c_",d), symbol("x_",d)
22+
sym, symx = Symbol("c_",d), Symbol("x_",d)
2323
:($sym = 1)
2424
end
2525

@@ -28,7 +28,7 @@ end
2828
compatibility with the general b-spline framework
2929
"""
3030
function gradient_coefficients(::Type{BSpline{Constant}}, d)
31-
sym, symx = symbol("c_",d), symbol("x_",d)
31+
sym, symx = Symbol("c_",d), Symbol("x_",d)
3232
:($sym = 0)
3333
end
3434

@@ -37,14 +37,14 @@ end
3737
compatibility with the general b-spline framework
3838
"""
3939
function hessian_coefficients(::Type{BSpline{Constant}}, d)
40-
sym = symbol("c_",d)
40+
sym = Symbol("c_",d)
4141
:($sym = 0)
4242
end
4343

4444
function index_gen{IT<:DimSpec{BSpline}}(::Type{BSpline{Constant}}, ::Type{IT}, N::Integer, offsets...)
4545
if (length(offsets) < N)
4646
d = length(offsets)+1
47-
sym = symbol("c_", d)
47+
sym = Symbol("c_", d)
4848
return :($sym * $(index_gen(IT, N, offsets..., 0)))
4949
else
5050
indices = [offsetsym(offsets[d], d) for d = 1:N]

src/b-splines/cubic.jl

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ Cubic
3030
`Cubic`), as well as auxiliary quantities `ixm_d`, `ixp_d` and `ixpp_d`
3131
"""
3232
function define_indices_d{BC}(::Type{BSpline{Cubic{BC}}}, d, pad)
33-
symix, symixm, symixp = symbol("ix_",d), symbol("ixm_",d), symbol("ixp_",d)
34-
symixpp, symx, symfx = symbol("ixpp_",d), symbol("x_",d), symbol("fx_",d)
33+
symix, symixm, symixp = Symbol("ix_",d), Symbol("ixm_",d), Symbol("ixp_",d)
34+
symixpp, symx, symfx = Symbol("ixpp_",d), Symbol("x_",d), Symbol("fx_",d)
3535
quote
3636
# ensure that all of ix_d, ixm_d, ixp_d, and ixpp_d are in-bounds no
3737
# matter the value of pad
@@ -53,8 +53,8 @@ If any `ixX_d` for `x ∈ {m, p, pp}` (note: not `c_d`) should fall outside of
5353
the data interval, they wrap around.
5454
"""
5555
function define_indices_d(::Type{BSpline{Cubic{Periodic}}}, d, pad)
56-
symix, symixm, symixp = symbol("ix_",d), symbol("ixm_",d), symbol("ixp_",d)
57-
symixpp, symx, symfx = symbol("ixpp_",d), symbol("x_",d), symbol("fx_",d)
56+
symix, symixm, symixp = Symbol("ix_",d), Symbol("ixm_",d), Symbol("ixp_",d)
57+
symixpp, symx, symfx = Symbol("ixpp_",d), Symbol("x_",d), Symbol("fx_",d)
5858
quote
5959
$symix = clamp(floor(Int, $symx), 1, size(itp,$d))
6060
$symfx = $symx - $symix
@@ -80,11 +80,11 @@ where `p` and `q` are defined in the docstring entry for `Cubic`, and
8080
`fx_d` in the docstring entry for `define_indices_d`.
8181
"""
8282
function coefficients{C<:Cubic}(::Type{BSpline{C}}, N, d)
83-
symm, sym = symbol("cm_",d), symbol("c_",d)
84-
symp, sympp = symbol("cp_",d) ,symbol("cpp_",d)
85-
symfx = symbol("fx_",d)
86-
symfx_cub = symbol("fx_cub_", d)
87-
sym_1m_fx_cub = symbol("one_m_fx_cub_", d)
83+
symm, sym = Symbol("cm_",d), Symbol("c_",d)
84+
symp, sympp = Symbol("cp_",d) ,Symbol("cpp_",d)
85+
symfx = Symbol("fx_",d)
86+
symfx_cub = Symbol("fx_cub_", d)
87+
sym_1m_fx_cub = Symbol("one_m_fx_cub_", d)
8888
quote
8989
$symfx_cub = cub($symfx)
9090
$sym_1m_fx_cub = cub(1-$symfx)
@@ -108,10 +108,10 @@ where `p` and `q` are defined in the docstring entry for `Cubic`, and
108108
`fx_d` in the docstring entry for `define_indices_d`.
109109
"""
110110
function gradient_coefficients{C<:Cubic}(::Type{BSpline{C}}, d)
111-
symm, sym, symp, sympp = symbol("cm_",d), symbol("c_",d), symbol("cp_",d), symbol("cpp_",d)
112-
symfx = symbol("fx_",d)
113-
symfx_sqr = symbol("fx_sqr_", d)
114-
sym_1m_fx_sqr = symbol("one_m_fx_sqr_", d)
111+
symm, sym, symp, sympp = Symbol("cm_",d), Symbol("c_",d), Symbol("cp_",d), Symbol("cpp_",d)
112+
symfx = Symbol("fx_",d)
113+
symfx_sqr = Symbol("fx_sqr_", d)
114+
sym_1m_fx_sqr = Symbol("one_m_fx_sqr_", d)
115115
quote
116116
$symfx_sqr = sqr($symfx)
117117
$sym_1m_fx_sqr = sqr(1 - $symfx)
@@ -136,8 +136,8 @@ where `p` and `q` are defined in the docstring entry for `Cubic`, and
136136
`fx_d` in the docstring entry for `define_indices_d`.
137137
"""
138138
function hessian_coefficients{C<:Cubic}(::Type{BSpline{C}}, d)
139-
symm, sym, symp, sympp = symbol("cm_",d), symbol("c_",d), symbol("cp_",d), symbol("cpp_",d)
140-
symfx = symbol("fx_",d)
139+
symm, sym, symp, sympp = Symbol("cm_",d), Symbol("c_",d), Symbol("cp_",d), Symbol("cpp_",d)
140+
symfx = Symbol("fx_",d)
141141
quote
142142
$symm = 1 - $symfx
143143
$sym = 3 * $symfx - 2
@@ -149,7 +149,7 @@ end
149149
function index_gen{C<:Cubic,IT<:DimSpec{BSpline}}(::Type{BSpline{C}}, ::Type{IT}, N::Integer, offsets...)
150150
if length(offsets) < N
151151
d = length(offsets)+1
152-
symm, sym, symp, sympp = symbol("cm_",d), symbol("c_",d), symbol("cp_",d), symbol("cpp_",d)
152+
symm, sym, symp, sympp = Symbol("cm_",d), Symbol("c_",d), Symbol("cp_",d), Symbol("cpp_",d)
153153
return :($symm * $(index_gen(IT, N, offsets...,-1)) + $sym * $(index_gen(IT, N, offsets..., 0)) +
154154
$symp * $(index_gen(IT, N, offsets..., 1)) + $sympp * $(index_gen(IT, N, offsets..., 2)))
155155
else

src/b-splines/indexing.jl

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ end
8282
function getindex_return_type{T,N,TCoefs,IT<:DimSpec{BSpline},GT<:DimSpec{GridType},Pad}(::Type{BSplineInterpolation{T,N,TCoefs,IT,GT,Pad}}, argtypes)
8383
Tret = eltype(TCoefs)
8484
for a in argtypes
85-
Tret = Base.promote_op(Base.MulFun, Tret, a)
85+
Tret = Base.promote_op(@functorize(*), Tret, a) # the macro is used to support julia 0.4
8686
end
8787
Tret
8888
end
@@ -98,11 +98,14 @@ end
9898
:(gradient!(g, itp, $(args...)))
9999
end
100100

101-
@generated function gradient{T,N}(itp::AbstractInterpolation{T,N}, xs...)
102-
n = count_interp_dims(itp, N)
103-
Tg = promote_type(T, [x <: AbstractArray ? eltype(x) : x for x in xs]...)
104-
xargs = [:(xs[$d]) for d in 1:length(xs)]
105-
:(gradient!(Array($Tg,$n), itp, $(xargs...)))
101+
# @eval uglyness required for disambiguation with method in Base
102+
for R in [:Real, :Any]
103+
@eval @generated function gradient{T,N}(itp::AbstractInterpolation{T,N}, xs::$R...)
104+
n = count_interp_dims(itp, N)
105+
Tg = promote_type(T, [x <: AbstractArray ? eltype(x) : x for x in xs]...)
106+
xargs = [:(xs[$d]) for d in 1:length(xs)]
107+
:(gradient!(Array($Tg,$n), itp, $(xargs...)))
108+
end
106109
end
107110

108111
gradient1{T}(itp::AbstractInterpolation{T,1}, x) = gradient(itp, x)[1]
@@ -155,7 +158,7 @@ end
155158

156159
hessian1{T}(itp::AbstractInterpolation{T,1}, x) = hessian(itp, x)[1,1]
157160

158-
offsetsym(off, d) = off == -1 ? symbol("ixm_", d) :
159-
off == 0 ? symbol("ix_", d) :
160-
off == 1 ? symbol("ixp_", d) :
161-
off == 2 ? symbol("ixpp_", d) : error("offset $off not recognized")
161+
offsetsym(off, d) = off == -1 ? Symbol("ixm_", d) :
162+
off == 0 ? Symbol("ix_", d) :
163+
off == 1 ? Symbol("ixp_", d) :
164+
off == 2 ? Symbol("ixpp_", d) : error("offset $off not recognized")

src/b-splines/linear.jl

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ Linear
2727
`Linear`), as well as the auxiliary quantity `ixp_d`
2828
"""
2929
function define_indices_d(::Type{BSpline{Linear}}, d, pad)
30-
symix, symixp, symfx, symx = symbol("ix_",d), symbol("ixp_",d), symbol("fx_",d), symbol("x_",d)
30+
symix, symixp, symfx, symx = Symbol("ix_",d), Symbol("ixp_",d), Symbol("fx_",d), Symbol("x_",d)
3131
quote
3232
$symix = clamp(floor(Int, $symx), 1, size(itp, $d)-1)
3333
$symixp = $symix + 1
@@ -46,7 +46,7 @@ where `p` is defined in the docstring entry for `Linear` and `fx_d` in the
4646
docstring entry for `define_indices_d`.
4747
"""
4848
function coefficients(::Type{BSpline{Linear}}, N, d)
49-
sym, symp, symfx = symbol("c_",d), symbol("cp_",d), symbol("fx_",d)
49+
sym, symp, symfx = Symbol("c_",d), Symbol("cp_",d), Symbol("fx_",d)
5050
quote
5151
$sym = 1 - $symfx
5252
$symp = $symfx
@@ -64,7 +64,7 @@ where `p` is defined in the docstring entry for `Linear`, and `fx_d` in the
6464
docstring entry for `define_indices_d`.
6565
"""
6666
function gradient_coefficients(::Type{BSpline{Linear}}, d)
67-
sym, symp, symfx = symbol("c_",d), symbol("cp_",d), symbol("fx_",d)
67+
sym, symp, symfx = Symbol("c_",d), Symbol("cp_",d), Symbol("fx_",d)
6868
quote
6969
$sym = -1
7070
$symp = 1
@@ -82,7 +82,7 @@ where `p` is defined in the docstring entry for `Linear`, and `fx_d` in the
8282
docstring entry for `define_indices_d`. (These are both ≡ 0.)
8383
"""
8484
function hessian_coefficients(::Type{BSpline{Linear}}, d)
85-
sym, symp = symbol("c_",d), symbol("cp_",d)
85+
sym, symp = Symbol("c_",d), Symbol("cp_",d)
8686
quote
8787
$sym = $symp = 0
8888
end
@@ -93,8 +93,8 @@ end
9393
function index_gen{IT<:DimSpec{BSpline}}(::Type{BSpline{Linear}}, ::Type{IT}, N::Integer, offsets...)
9494
if length(offsets) < N
9595
d = length(offsets)+1
96-
sym = symbol("c_", d)
97-
symp = symbol("cp_", d)
96+
sym = Symbol("c_", d)
97+
symp = Symbol("cp_", d)
9898
return :($sym * $(index_gen(IT, N, offsets..., 0)) + $symp * $(index_gen(IT, N, offsets..., 1)))
9999
else
100100
indices = [offsetsym(offsets[d], d) for d = 1:N]

src/b-splines/quadratic.jl

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ Quadratic
2929
`Quadratic`), as well as auxiliary quantities `ixm_d` and `ixp_d`
3030
"""
3131
function define_indices_d{BC}(::Type{BSpline{Quadratic{BC}}}, d, pad)
32-
symix, symixm, symixp = symbol("ix_",d), symbol("ixm_",d), symbol("ixp_",d)
33-
symx, symfx = symbol("x_",d), symbol("fx_",d)
32+
symix, symixm, symixp = Symbol("ix_",d), Symbol("ixm_",d), Symbol("ixp_",d)
33+
symx, symfx = Symbol("x_",d), Symbol("fx_",d)
3434
quote
3535
# ensure that all three ix_d, ixm_d, and ixp_d are in-bounds no matter
3636
# the value of pad
@@ -42,8 +42,8 @@ function define_indices_d{BC}(::Type{BSpline{Quadratic{BC}}}, d, pad)
4242
end
4343
end
4444
function define_indices_d(::Type{BSpline{Quadratic{Periodic}}}, d, pad)
45-
symix, symixm, symixp = symbol("ix_",d), symbol("ixm_",d), symbol("ixp_",d)
46-
symx, symfx = symbol("x_",d), symbol("fx_",d)
45+
symix, symixm, symixp = Symbol("ix_",d), Symbol("ixm_",d), Symbol("ixp_",d)
46+
symx, symfx = Symbol("x_",d), Symbol("fx_",d)
4747
quote
4848
$symix = clamp(round(Int, $symx), 1, size(itp,$d))
4949
$symfx = $symx - $symix
@@ -52,8 +52,8 @@ function define_indices_d(::Type{BSpline{Quadratic{Periodic}}}, d, pad)
5252
end
5353
end
5454
function define_indices_d{BC<:Union{InPlace,InPlaceQ}}(::Type{BSpline{Quadratic{BC}}}, d, pad)
55-
symix, symixm, symixp = symbol("ix_",d), symbol("ixm_",d), symbol("ixp_",d)
56-
symx, symfx = symbol("x_",d), symbol("fx_",d)
55+
symix, symixm, symixp = Symbol("ix_",d), Symbol("ixm_",d), Symbol("ixp_",d)
56+
symx, symfx = Symbol("x_",d), Symbol("fx_",d)
5757
pad == 0 || error("Use $BC only with interpolate!")
5858
quote
5959
# ensure that all three ix_d, ixm_d, and ixp_d are in-bounds no matter
@@ -78,8 +78,8 @@ where `p` and `q` are defined in the docstring entry for `Quadratic`, and
7878
`fx_d` in the docstring entry for `define_indices_d`.
7979
"""
8080
function coefficients{Q<:Quadratic}(::Type{BSpline{Q}}, N, d)
81-
symm, sym, symp = symbol("cm_",d), symbol("c_",d), symbol("cp_",d)
82-
symfx = symbol("fx_",d)
81+
symm, sym, symp = Symbol("cm_",d), Symbol("c_",d), Symbol("cp_",d)
82+
symfx = Symbol("fx_",d)
8383
quote
8484
$symm = sqr($symfx - SimpleRatio(1,2))/2
8585
$sym = SimpleRatio(3,4) - sqr($symfx)
@@ -99,8 +99,8 @@ where `p` and `q` are defined in the docstring entry for `Quadratic`, and
9999
`fx_d` in the docstring entry for `define_indices_d`.
100100
"""
101101
function gradient_coefficients{Q<:Quadratic}(::Type{BSpline{Q}}, d)
102-
symm, sym, symp = symbol("cm_",d), symbol("c_",d), symbol("cp_",d)
103-
symfx = symbol("fx_",d)
102+
symm, sym, symp = Symbol("cm_",d), Symbol("c_",d), Symbol("cp_",d)
103+
symfx = Symbol("fx_",d)
104104
quote
105105
$symm = $symfx - SimpleRatio(1,2)
106106
$sym = -2 * $symfx
@@ -120,7 +120,7 @@ where `p` and `q` are defined in the docstring entry for `Quadratic`, and
120120
`fx_d` in the docstring entry for `define_indices_d`.
121121
"""
122122
function hessian_coefficients{Q<:Quadratic}(::Type{BSpline{Q}}, d)
123-
symm, sym, symp = symbol("cm_",d), symbol("c_",d), symbol("cp_",d)
123+
symm, sym, symp = Symbol("cm_",d), Symbol("c_",d), Symbol("cp_",d)
124124
quote
125125
$symm = 1
126126
$sym = -2
@@ -133,7 +133,7 @@ end
133133
function index_gen{Q<:Quadratic,IT<:DimSpec{BSpline}}(::Type{BSpline{Q}}, ::Type{IT}, N::Integer, offsets...)
134134
if length(offsets) < N
135135
d = length(offsets)+1
136-
symm, sym, symp = symbol("cm_",d), symbol("c_",d), symbol("cp_",d)
136+
symm, sym, symp = Symbol("cm_",d), Symbol("c_",d), Symbol("cp_",d)
137137
return :($symm * $(index_gen(IT, N, offsets...,-1)) + $sym * $(index_gen(IT, N, offsets..., 0)) +
138138
$symp * $(index_gen(IT, N, offsets..., 1)))
139139
else

src/extrapolation/extrapolation.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ and indices. The heavy lifting is done by the `extrap_prep` function; see
4646
`?extrap_prep` for details.
4747
"""
4848
function getindex_impl{T,N,ITPT,IT,GT,ET}(etp::Type{Extrapolation{T,N,ITPT,IT,GT,ET}}, xs...)
49-
coords = [symbol("xs_",d) for d in 1:N]
49+
coords = [Symbol("xs_",d) for d in 1:N]
5050
quote
5151
@nexprs $N d->(xs_d = xs[d])
5252
$(extrap_prep(ET, Val{N}()))
@@ -60,7 +60,7 @@ end
6060

6161

6262
function gradient!_impl{T,N,ITPT,IT,GT,ET}(g, etp::Type{Extrapolation{T,N,ITPT,IT,GT,ET}}, xs...)
63-
coords = [symbol("xs_", d) for d in 1:N]
63+
coords = [Symbol("xs_", d) for d in 1:N]
6464
quote
6565
@nexprs $N d->(xs_d = xs[d])
6666
$(extrap_prep(Val{:gradient}(), ET, Val{N}()))

src/extrapolation/flat.jl

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
function extrap_prep{N,d}(::Type{Flat}, ::Val{N}, ::Val{d})
2-
xs_d = symbol("xs_", d)
2+
xs_d = Symbol("xs_", d)
33
:($xs_d = clamp($xs_d, lbound(etp, $d), ubound(etp, $d)))
44
end
55

66
function extrap_prep{N,d}(::Type{Flat}, ::Val{N}, ::Val{d}, ::Val{:lo})
7-
xs_d = symbol("xs_", d)
7+
xs_d = Symbol("xs_", d)
88
:($xs_d = max($xs_d, lbound(etp, $d)))
99
end
1010

1111
function extrap_prep{N,d}(::Type{Flat}, ::Val{N}, ::Val{d}, ::Val{:hi})
12-
xs_d = symbol("xs_", d)
12+
xs_d = Symbol("xs_", d)
1313
:($xs_d = min($xs_d, ubound(etp, $d)))
1414
end
1515

1616
function extrap_prep{N,d}(::Val{:gradient}, ::Type{Flat}, ::Val{N}, ::Val{d}, ::Val{:lo})
17-
coords = [symbol("xs_", k) for k in 1:N]
17+
coords = [Symbol("xs_", k) for k in 1:N]
1818
xs_d = coords[d]
1919

2020
quote
@@ -28,7 +28,7 @@ function extrap_prep{N,d}(::Val{:gradient}, ::Type{Flat}, ::Val{N}, ::Val{d}, ::
2828
end
2929

3030
function extrap_prep{N,d}(::Val{:gradient}, ::Type{Flat}, ::Val{N}, ::Val{d}, ::Val{:hi})
31-
coords = [symbol("xs_", k) for k in 1:N]
31+
coords = [Symbol("xs_", k) for k in 1:N]
3232
xs_d = coords[d]
3333

3434
quote

0 commit comments

Comments
 (0)