Skip to content

mean_and_var and mean_and_std default value for "corrected" in source does not agree with documentation #604

Open
@zierenberg

Description

@zierenberg

Let me start with a big thank you for the nice package.

I have noticed that there is a mismatch between the documentation and implementation of the default values for the "corrected" flag in mean_and_var and mean_and_std. In the documentation it says

mean_and_std(x, [w::AbstractWeights], [dim]; corrected=false) -> (mean, std)

but everywhere in the code (whenever corrected::Bool is explicitly set which is somehow only for mean_and_std and mean_and_var) it is set to true, e.g.,

function mean_and_std(A::RealArray; corrected::Bool=true)
    m = mean(A)
    s = stdm(A, m; corrected=corrected)
    m, s
end

I would have started to change it, but I was unsure which one you agreed on to be the proper default case. After finding depcheck in common.jl I was even more unsure. Probably those function that set corrected explicitly should be updated to use depcheck?

Metadata

Metadata

Assignees

No one assigned

    Labels

    breakingA breaking change that needs a semver major releasebug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions