From 22aa7613f3372f84faedc8169668e4b99a5aa4c8 Mon Sep 17 00:00:00 2001 From: dsweber2 Date: Tue, 14 Apr 2020 10:33:22 -0700 Subject: [PATCH] convert all eltypes of GlmResp args to the eltype of the first --- src/glmfit.jl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/glmfit.jl b/src/glmfit.jl index 1b556be2..f715fca8 100644 --- a/src/glmfit.jl +++ b/src/glmfit.jl @@ -60,7 +60,9 @@ end function GlmResp(y::AbstractVector{<:Real}, d::D, l::L, off::AbstractVector{<:Real}, wts::AbstractVector{<:Real}) where {D, L} - GlmResp(float(y), d, l, float(off), float(wts)) + yt = float(y) + T = eltype(yt) + GlmResp(T.(y), d, l, T.(off), T.(wts)) end deviance(r::GlmResp) = sum(r.devresid)