Skip to content

Commit a40161c

Browse files
authored
Merge pull request #38 from QuantEcon/fbot/deps
Fix deprecations
2 parents 60a1a82 + 11af20e commit a40161c

4 files changed

Lines changed: 9 additions & 11 deletions

File tree

demo/demapp01.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ function main()
7575
# One may evaluate the accuracy of the Chebychev polynomial approximant by
7676
# computing the approximation error on a highly refined grid of points:
7777
ngrid = 5001 # number of grid nodes
78-
xgrid = linspace(a, b, ngrid) # generate refined grid for plotting
78+
xgrid = range(a, stop=b, length=ngrid) # generate refined grid for plotting
7979

8080

8181
function plot_approx(f::Function, basistype::Symbol, n, a, b, xgrid, k=0)

demo/dierckxcompare_1d.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ fs = [f1, f2, f3]
1313
fps = [fp1, fp2, fp3]
1414
nf = length(fs)
1515

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

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

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

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

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

6868
devalderiv = Dierckx.derivative(dspl, xfine)

demo/dierckxcompare_2d.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ f3(x, y) = 1.5 + log(x .* y)
99
fs = [f1, f2, f3]
1010
nf = length(fs)
1111

12-
x = collect(linspace(.5, 2, 35))
13-
y = collect(linspace(.2, 4, 35))
12+
x = collect(range(.5, stop=2, length=35))
13+
y = collect(range(.2, stop=4, length=35))
1414

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

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

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

3535
deval = Dierckx.evalgrid(dspl, xfine, yfine)

src/CompEcon.jl

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
__precompile__()
2-
31
module CompEcon
42

53
using Reexport

0 commit comments

Comments
 (0)