Skip to content

Commit 2e27add

Browse files
fredrikekreararslan
authored andcommitted
fix deprecated array constructor (#90)
* fix deprecated array constructor * import IterativeEigenSolvers.svds
1 parent c684b3e commit 2e27add

File tree

4 files changed

+6
-3
lines changed

4 files changed

+6
-3
lines changed

REQUIRE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
julia 0.6
2-
Compat 0.33
2+
Compat 0.39
33
JSON

src/execution.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ end
128128
# the logistic function is useful for determining `evals` for `1 < t < RESOLUTION`
129129
logistic(u, l, k, t, t0) = round(Int, ((u - l) / (1 + exp(-k * (t - t0)))) + l)
130130

131-
const EVALS = Vector{Int}(9000) # any `t > length(EVALS)` should get an `evals` of 1
131+
const EVALS = Vector{Int}(uninitialized, 9000) # any `t > length(EVALS)` should get an `evals` of 1
132132
for t in 1:400 (EVALS[t] = logistic(1006, 195, -0.025, t, 200)) end # EVALS[1] == 1000, EVALS[400] == 200
133133
for t in 401:1000 (EVALS[t] = logistic(204, -16, -0.01, t, 800)) end # EVALS[401] == 200, EVALS[1000] == 10
134134
for i in 1:8 (EVALS[((i*1000)+1):((i+1)*1000)] = 11 - i) end # linearly decrease from EVALS[1000]

src/serialization.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ function recover(x::Vector)
2828
fields = x[2]::Dict
2929
T = eval(parse(typename))::Type
3030
fc = fieldcount(T)
31-
xs = Vector{Any}(fc)
31+
xs = Vector{Any}(uninitialized, fc)
3232
for i = 1:fc
3333
ft = fieldtype(T, i)
3434
fn = String(fieldname(T, i))

test/ExecutionTests.jl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ module ExecutionTests
33
using BenchmarkTools
44
using Compat
55
using Compat.Test
6+
@static if VERSION >= v"0.7.0-DEV.2655" # IterativeEigenSolvers to stdlib
7+
using IterativeEigenSolvers
8+
end
69

710
seteq(a, b) = length(a) == length(b) == length(intersect(a, b))
811

0 commit comments

Comments
 (0)