From 12a4bb964e9ef4f1066edc1aa11ccb399de75b33 Mon Sep 17 00:00:00 2001 From: Felix Cremer Date: Fri, 10 Aug 2018 00:03:20 +0200 Subject: [PATCH 1/3] Delete import LinearAlgebra: gradient The gradient function was completely removed and not moved to LinearAlgebra as documented in the depwarn. This import fails therefore. --- src/Interpolations.jl | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/Interpolations.jl b/src/Interpolations.jl index 5cb222bf..53819e9d 100644 --- a/src/Interpolations.jl +++ b/src/Interpolations.jl @@ -46,8 +46,6 @@ import Base: convert, size, getindex, promote_rule, @static if VERSION < v"0.7.0-DEV.3449" import Base: gradient -else - import LinearAlgebra: gradient end import Compat: axes From 00628e3667c62a9ab22f3d5acdf2c753d537e38d Mon Sep 17 00:00:00 2001 From: Felix Cremer Date: Fri, 10 Aug 2018 13:44:42 +0200 Subject: [PATCH 2/3] Export gradient function This is needed, because we don't import the gradient function anymore. --- src/Interpolations.jl | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Interpolations.jl b/src/Interpolations.jl index 53819e9d..798f4c38 100644 --- a/src/Interpolations.jl +++ b/src/Interpolations.jl @@ -8,6 +8,7 @@ export extrapolate, scale, + gradient, gradient!, gradient1, hessian!, From 1d1a65cb458a863f37d59180a687b2f15a3cf53a Mon Sep 17 00:00:00 2001 From: Felix Cremer Date: Fri, 10 Aug 2018 13:45:56 +0200 Subject: [PATCH 3/3] Change Random.srand to Random.seed! --- test/scaling/nointerp.jl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/scaling/nointerp.jl b/test/scaling/nointerp.jl index 3dbd906e..ba5239bc 100644 --- a/test/scaling/nointerp.jl +++ b/test/scaling/nointerp.jl @@ -23,7 +23,9 @@ end @test length(gradient(sitp, pi/3, 2)) == 1 # check for case where initial/middle indices are NoInterp but later ones are <:BSpline -srand(1234) + +isdefined(Random, :seed!) ? Random.seed!(1234) : srand(1234) # `srand` was renamed to `seed!` + z0 = rand(10,10) za = copy(z0) zb = copy(z0')