Skip to content

Commit 8728d49

Browse files
committed
Fix more depwarns
1 parent a367268 commit 8728d49

File tree

8 files changed

+21
-21
lines changed

8 files changed

+21
-21
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ language: julia
33
os:
44
- linux
55
julia:
6-
- 0.6
6+
- 0.7
77
- nightly
88
matrix:
99
allow_failures:

appveyor.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
environment:
22
matrix:
3-
- JULIA_URL: "https://julialang-s3.julialang.org/bin/winnt/x86/0.6/julia-0.6-latest-win32.exe"
4-
- JULIA_URL: "https://julialang-s3.julialang.org/bin/winnt/x64/0.6/julia-0.6-latest-win64.exe"
3+
- JULIA_URL: "https://julialang-s3.julialang.org/bin/winnt/x86/0.7/julia-0.7-latest-win32.exe"
4+
- JULIA_URL: "https://julialang-s3.julialang.org/bin/winnt/x64/0.7/julia-0.7-latest-win64.exe"
55
- JULIA_URL: "https://julialangnightlies-s3.julialang.org/bin/winnt/x86/julia-latest-win32.exe"
66
- JULIA_URL: "https://julialangnightlies-s3.julialang.org/bin/winnt/x64/julia-latest-win64.exe"
77
matrix:

src/array_partition.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ end
124124

125125
Base.mapreduce(f,op,A::ArrayPartition) = mapreduce(f,op,(mapreduce(f,op,x) for x in A.x))
126126
Base.any(f,A::ArrayPartition) = any(f,(any(f,x) for x in A.x))
127-
function Base.copy!(dest::Array,A::ArrayPartition)
127+
function Base.copyto!(dest::Array,A::ArrayPartition)
128128
@assert length(dest) == length(A)
129129
cur = 1
130130
@inbounds for i in 1:length(A.x)
@@ -133,7 +133,7 @@ function Base.copy!(dest::Array,A::ArrayPartition)
133133
end
134134
end
135135

136-
function Base.copy!(A::ArrayPartition,src::ArrayPartition)
136+
function Base.copyto!(A::ArrayPartition,src::ArrayPartition)
137137
@assert length(src) == length(A)
138138
cur = 1
139139
@inbounds for i in 1:length(A.x)

src/utils.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ function recursivecopy!(b::AbstractArray{T,N},a::AbstractArray{T2,N}) where {T<:
2626
end
2727

2828
function recursivecopy!(b::AbstractArray{T,N},a::AbstractArray{T2,N}) where {T<:Number,T2<:Number,N}
29-
copy!(b,a)
29+
copyto!(b,a)
3030
end
3131

3232
function recursivecopy!(b::AbstractArray{T,N},a::AbstractArray{T2,N}) where {T<:AbstractArray,T2<:AbstractArray,N}

test/basic_indexing.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ using RecursiveArrayTools
22

33
# Example Problem
44
recs = [[1, 2, 3], [4, 5, 6], [7, 8, 9]]
5-
testa = cat(2, recs...)
5+
testa = cat(recs..., dims=2)
66
testva = VectorOfArray(recs)
77
t = [1,2,3]
88
diffeq = DiffEqArray(recs,t)
@@ -13,7 +13,7 @@ testa[1:2, 1:2] == [1 4; 2 5]
1313

1414
# # ndims == 2
1515
recs = [rand(8) for i in 1:10]
16-
testa = cat(2, recs...)
16+
testa = cat(recs...,dims=2)
1717
testva = VectorOfArray(recs)
1818

1919
# ## Linear indexing
@@ -36,7 +36,7 @@ testva = VectorOfArray(recs)
3636

3737
# # ndims == 3
3838
recs = recs = [rand(10, 8) for i in 1:15]
39-
testa = cat(3, recs...)
39+
testa = cat(recs...,dims=3)
4040
testva = VectorOfArray(recs)
4141

4242
# ## (Int, Int, Int)

test/copy_static_array_test.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ end
1313
# Immutable FieldVector
1414
vec = ImmutableFV(1.,2.)
1515
a = [vec]
16-
b = zeros(a)
16+
b = zero(a)
1717
recursivecopy!(b, a)
1818
@test a[1] == b[1]
1919
copyat_or_push!(a, 2, b[1])
@@ -25,7 +25,7 @@ copyat_or_push!(a, 2, b[1])
2525
# Mutable FieldVector
2626
vec = MutableFV(1.,2.)
2727
a = [vec]
28-
b = zeros(a)
28+
b = zero(a)
2929
recursivecopy!(b, a)
3030
@test a[1] == b[1]
3131
a[1][1] *= 5
@@ -41,7 +41,7 @@ copyat_or_push!(a, 2, b[1])
4141
# SArray
4242
vec = @SArray [1., 2.]
4343
a = [vec]
44-
b = zeros(a)
44+
b = zero(a)
4545
recursivecopy!(b, a)
4646
@test a[1] == b[1]
4747
copyat_or_push!(a, 2, b[1])
@@ -53,7 +53,7 @@ copyat_or_push!(a, 2, b[1])
5353
# MArray
5454
vec = @MArray [1., 2.]
5555
a = [vec]
56-
b = zeros(a)
56+
b = zero(a)
5757
recursivecopy!(b, a)
5858
a[1][1] *= 5
5959
@test a[1] != b[1]

test/interface_tests.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ testva[4, 9] # == testva.data[9][4]
3636
# convert array from VectorOfArray
3737
recs = [rand(10, 7) for i = 1:8]
3838
testva = VectorOfArray(recs)
39-
testa = cat(3, recs...)
39+
testa = cat(recs...,dims=3)
4040
@test convert(Array,testva) == testa
4141

4242
recs = [[1, 2, 3], [3 5; 6 7], [8, 9, 10, 11]]

test/partitions_test.jl

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ p2[1] = 1
1111
@test p2.x[1] != p.x[1]
1212

1313
C = rand(10)
14-
p3 = similar(p,indices(p))
14+
p3 = similar(p,axes(p))
1515
@test length(p3.x[1]) == length(p3.x[2]) == 5
1616
@test length(p.x) == length(p2.x) == length(p3.x) == 2
1717

@@ -21,20 +21,20 @@ B = (rand(5),rand(5))
2121
p2 = ArrayPartition(B)
2222
a = 5
2323

24-
p .= (*).(p,5)
25-
p .= (*).(p,a)
26-
p .= (*).(p,p2)
27-
K = (*).(p,p2)
24+
@. p = p*5
25+
@. p = p*a
26+
@. p = p*p2
27+
K = p.*p2
2828

2929
p.*rand(5)
3030
b = rand(10)
3131
c = rand(10)
32-
copy!(b,p)
32+
copyto!(b,p)
3333

3434
@test b[1:5] == p.x[1]
3535
@test b[6:10] == p.x[2]
3636

37-
copy!(p,c)
37+
copyto!(p,c)
3838
@test c[1:5] == p.x[1]
3939
@test c[6:10] == p.x[2]
4040

0 commit comments

Comments
 (0)