From 44ed3073cd796c5b72f563647100ec568f52d70f Mon Sep 17 00:00:00 2001 From: Seth Axen Date: Mon, 18 Nov 2024 13:25:09 +0100 Subject: [PATCH] Fix determination of nan type --- src/mcse.jl | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/mcse.jl b/src/mcse.jl index 567db06..c2b4188 100644 --- a/src/mcse.jl +++ b/src/mcse.jl @@ -96,8 +96,7 @@ end function _mcse_quantile(x, p, Seff) Seff === missing && return missing if isnan(Seff) - T = eltype(x) / 1 - return T(NaN) + return oftype(oneunit(eltype(x)) / 1, NaN) end S = length(x) # quantile error distribution is asymptotically normal; estimate σ (mcse) with 2