Skip to content

Commit

Permalink
fixes for 0.7 (#69)
Browse files Browse the repository at this point in the history
* Fix deprecations

* bump version to 0.7-beta

* fix implicit broadcast assignment deprecation

* don't test on 0.6

*  msng -> nonmissing (#70)

* msng -> nonmissing

msng had a confusing name and a wrong definition in doc. I renamed the vector and corrected the doc.

* better doc

* Fix deprecations

* bump version to 0.7-beta

* fix implicit broadcast assignment deprecation

* don't test on 0.6

* use init named argument in reduce
  • Loading branch information
kleinschmidt authored and dmbates committed Jul 6, 2018
1 parent 33f7b9c commit c75823d
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ os:
- linux
- osx
julia:
- 0.6
- 0.7
- nightly
notifications:
email: false
Expand Down
2 changes: 1 addition & 1 deletion REQUIRE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
julia 0.6
julia 0.7-beta
DataFrames 0.11.5
StatsBase 0.22.0
Compat 0.63
4 changes: 2 additions & 2 deletions src/contrasts.jl
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ EffectsCoding
function contrasts_matrix(C::EffectsCoding, baseind, n)
not_base = [1:(baseind-1); (baseind+1):n]
mat = Matrix(1.0I, n, n)[:, not_base]
mat[baseind, :] = -1
mat[baseind, :] .= -1
return mat
end

Expand Down Expand Up @@ -345,7 +345,7 @@ HelmertCoding
function contrasts_matrix(C::HelmertCoding, baseind, n)
mat = zeros(n, n-1)
for i in 1:n-1
mat[1:i, i] = -1
mat[1:i, i] .= -1
mat[i+1, i] = i
end

Expand Down
4 changes: 2 additions & 2 deletions src/modelframe.jl
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ function _unique(x::AbstractArray{T}) where T
levs = T >: Missing ?
convert(Array{Missings.T(T)}, filter!(!ismissing, unique(x))) :
unique(x)
try; sort!(levs); end
try; sort!(levs); catch; end
return levs
end

Expand Down Expand Up @@ -257,5 +257,5 @@ function StatsBase.coefnames(mf::ModelFrame)
push!(term_names, expandtermnames(names))
end

reduce(vcat, Vector{String}(), term_names)
reduce(vcat, term_names, init=Vector{String}())
end
2 changes: 1 addition & 1 deletion test/runtests.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
using Compat
using Compat.Test
using Test
using Compat.LinearAlgebra
using Compat.SparseArrays

Expand Down

0 comments on commit c75823d

Please sign in to comment.