Skip to content

Commit

Permalink
Fix two more deprecations
Browse files Browse the repository at this point in the history
  • Loading branch information
nalimilan committed Jun 10, 2018
1 parent e559445 commit c7b3d14
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/array.jl
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,7 @@ function copyto!(dest::CatArrOrSub{T, N}, dstart::Integer,
n::Integer) where {T, N}
n == 0 && return dest
n < 0 && throw(ArgumentError(string("tried to copy n=", n, " elements, but n should be nonnegative")))
destinds, srcinds = linearindices(dest), linearindices(src)
destinds, srcinds = LinearIndices(dest), LinearIndices(src)
(dstart destinds && dstart+n-1 destinds) || throw(BoundsError(dest, dstart:dstart+n-1))
(sstart srcinds && sstart+n-1 srcinds) || throw(BoundsError(src, sstart:sstart+n-1))

Expand Down
6 changes: 3 additions & 3 deletions test/12_missingarray.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1034,7 +1034,7 @@ end
end

@testset "vcat with all empty array" begin
ca1 = CategoricalArray(0)
ca1 = CategoricalArray(undef, 0)
ca2 = CategoricalArray([missing, "b"])
r = vcat(ca1, ca2)
@test r [missing, "b"]
Expand All @@ -1043,7 +1043,7 @@ end
end

@testset "vcat with all missings and empty" begin
ca1 = CategoricalArray(0)
ca1 = CategoricalArray(undef, 0)
ca2 = CategoricalArray([missing, missing])
r = vcat(ca1, ca2)
@test r [missing, missing]
Expand All @@ -1056,7 +1056,7 @@ end
@test isordered(r)

ca1 = CategoricalArray(["a", missing])
ca2 = CategoricalArray{Union{String, Missing}}(2)
ca2 = CategoricalArray{Union{String, Missing}}(undef, 2)
ordered!(ca1, true)
@test isempty(levels(ca2))
r = vcat(ca1, ca2)
Expand Down

0 comments on commit c7b3d14

Please sign in to comment.