Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RFC: Sparse ModelMatrix support #1040

Merged
merged 11 commits into from
Aug 26, 2016
6 changes: 3 additions & 3 deletions src/statsmodels/formula.jl
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ type ModelFrame
contrasts::Dict{Symbol, ContrastsMatrix}
end

type ModelMatrix{T <: @compat(Union{Float32, Float64})}
m::Matrix{T}
type ModelMatrix{T <: @compat(Union{Matrix{Float32}, Matrix{Float64}, SparseMatrixCSC{Float32,Int}, SparseMatrixCSC{Float64,Int}})}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could drop the @compat here since the package no longer supports Julia 0.3.

m::T
assign::Vector{Int}
end

Expand Down Expand Up @@ -479,7 +479,7 @@ function ModelMatrix(mf::ModelFrame)
append!(assign, fill(i_term, size(blocks[end], 2)))
end

ModelMatrix{Float64}(reduce(hcat, blocks), assign)
ModelMatrix{Matrix{Float64}}(reduce(hcat, blocks), assign)
end


Expand Down