Skip to content

Commit

Permalink
Fix deprecations
Browse files Browse the repository at this point in the history
  • Loading branch information
femtocleaner[bot] committed Sep 26, 2018
1 parent 60a1a82 commit 11af20e
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 11 deletions.
2 changes: 1 addition & 1 deletion demo/demapp01.jl
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ function main()
# One may evaluate the accuracy of the Chebychev polynomial approximant by
# computing the approximation error on a highly refined grid of points:
ngrid = 5001 # number of grid nodes
xgrid = linspace(a, b, ngrid) # generate refined grid for plotting
xgrid = range(a, stop=b, length=ngrid) # generate refined grid for plotting


function plot_approx(f::Function, basistype::Symbol, n, a, b, xgrid, k=0)
Expand Down
8 changes: 4 additions & 4 deletions demo/dierckxcompare_1d.jl
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ fs = [f1, f2, f3]
fps = [fp1, fp2, fp3]
nf = length(fs)

x = collect(linspace(.5, 2, 35))
finex = collect(linspace(1e-2, 2*pi - 1e-2, 150))
x = collect(range(.5, stop=2, length=35))
finex = collect(range(1e-2, stop=2*pi - 1e-2, length=150))
ys = map(f->f(x), fs)
finey = map(f->f(finex), fs)

Expand All @@ -32,7 +32,7 @@ function compare_D_CE_levels(f::Function, x::Array{Float64, 1}, order::Int)
c, bs = funfitxy(cebasis, xx, yy)

# Evaluate Splines on finer grid
xfine = collect(linspace(x[1], x[end], 2*n + 1))
xfine = collect(range(x[1], stop=x[end], length=2*n + 1))
yfine = f(xfine)

deval = Dierckx.evaluate(dspl, xfine)
Expand Down Expand Up @@ -62,7 +62,7 @@ function compare_D_CE_deriv(f::Function, fp::Function, x::Array{Float64, 1}, ord
c, bs = funfitxy(cebasis, xx, yy)

# Evaluate Splines on finer grid
xfine = collect(linspace(x[1], x[end], 2*n + 1))
xfine = collect(range(x[1], stop=x[end], length=2*n + 1))
ypfine = fp(xfine)

devalderiv = Dierckx.derivative(dspl, xfine)
Expand Down
8 changes: 4 additions & 4 deletions demo/dierckxcompare_2d.jl
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ f3(x, y) = 1.5 + log(x .* y)
fs = [f1, f2, f3]
nf = length(fs)

x = collect(linspace(.5, 2, 35))
y = collect(linspace(.2, 4, 35))
x = collect(range(.5, stop=2, length=35))
y = collect(range(.2, stop=4, length=35))

function compare_D_CE_levels(f::Function, x::Array{Float64, 1}, y::Array{Float64, 1}, order::Int)

Expand All @@ -28,8 +28,8 @@ function compare_D_CE_levels(f::Function, x::Array{Float64, 1}, y::Array{Float64
c, bs = funfitxy(cebasis, xx, yy)

# Evaluate Splines on finer grid
xfine = collect(linspace(x[1], x[end], 2*n + 1))
yfine = collect(linspace(y[1], y[end], 2*n + 1))
xfine = collect(range(x[1], stop=x[end], length=2*n + 1))
yfine = collect(range(y[1], stop=y[end], length=2*n + 1))
zfine = f(xfine, yfine')

deval = Dierckx.evalgrid(dspl, xfine, yfine)
Expand Down
2 changes: 0 additions & 2 deletions src/CompEcon.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
__precompile__()

module CompEcon

using Reexport
Expand Down

0 comments on commit 11af20e

Please sign in to comment.