Commit 82d18ddd authored by Antonino's avatar Antonino

Vect->AbstractVec in fit_routine and pvalue

parent aff8cc93
......@@ -1312,7 +1312,7 @@ function fit_routine(model::Function,
[uwerr(y, wpm) for y in ydata]
if length(W) ==0
if corr
C = length(C) ==0 ? ADerrors.cov(ydata,wpm) : C
C = length(C) ==0 ? GammaMethod.cov_AD(ydata,wpm) : C
W = LinearAlgebra.pinv(C);
W = (W'+W)*0.5
else
......@@ -1566,9 +1566,9 @@ Q = pvalue(chisq, chi2, value.(up), y, wpm; W = 1.0 ./ err.(y) .^ 2, nmc=10000)
"""
function pvalue(chisq::Function,
chi2::Float64,
xp::Vector{Float64},
data::Vector{uwreal},
W::Vector{Float64}=Vector{Float64}();
xp::AbstractVector{Float64},
data::AbstractVector{uwreal},
W::AbstractVector{Float64}=Vector{Float64}();
wpm::Union{Dict{Int64,Vector{Float64}},Dict{String,Vector{Float64}}, Nothing} = Dict{Int64,Vector{Float64}}(),
nmc::Int64 = 5000,
C::AbstractMatrix{Float64} = ADerrors.cov(data,wpm))
......@@ -1644,9 +1644,9 @@ end
function pvalue(chisq::Function,
chi2::Float64,
xp::Vector{Float64},
data::Vector{uwreal},
W::Array{Float64,2};
xp::AbstractVector{Float64},
data::AbstractVector{uwreal},
W::AbstractArray{Float64,2};
wpm::Union{Dict{Int64,Vector{Float64}},Dict{String,Vector{Float64}}, Nothing} = Dict{Int64,Vector{Float64}}(),
nmc::Int64 = 5000,
C::AbstractMatrix{Float64} = ADerrors.cov(data,wpm))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment