Skip to content

Commit

Permalink
Two small fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
nalimilan committed Sep 3, 2016
1 parent 4c3d495 commit 29ef542
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/statsmodels/formula.jl
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,7 @@ creating the model matrix.

I = size(dfrm, 1)
J = mapreduce(x -> size(x, 2), +, blocks)
X = zeros(eltype(T), I, J)
X = Array(eltype(T), I, J)
i = 1
for block in blocks
len = size(block, 2)
Expand Down
2 changes: 1 addition & 1 deletion test/formula.jl
Original file line number Diff line number Diff line change
Expand Up @@ -545,5 +545,5 @@ df = DataFrame(x = [1.0,2.0,3.0], y = [4.0,5.0,6.0])
mf = ModelFrame(y ~ 0 + x, df)
X = ModelMatrix(mf).m
X[1] = 0.0
@test isapprox(mf.df[1, :x], 1.0)
@test mf.df[1, :x] == 1.0
end

0 comments on commit 29ef542

Please sign in to comment.