Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UndefVarError: l not defined when calling fit with dims = nothing using StatsBase v0.33.0 #594

Closed
ali-ramadhan opened this issue Aug 23, 2020 · 0 comments · Fixed by #595

Comments

@ali-ramadhan
Copy link

julia> using StatsBase

julia> fit(ZScoreTransform, rand(3, 3))
ERROR: UndefVarError: l not defined
Stacktrace:
 [1] fit(::Type{ZScoreTransform}, ::Array{Float64,2}; dims::Nothing, center::Bool, scale::Bool) at /home/alir/.julia/packages/StatsBase/unDUx/src/transformations.jl:126
 [2] fit(::Type{ZScoreTransform}, ::Array{Float64,2}) at /home/alir/.julia/packages/StatsBase/unDUx/src/transformations.jl:111
 [3] top-level scope at REPL[2]:1

According to the docs (https://juliastats.org/StatsBase.jl/stable/transformations/#StatsBase.fit-Tuple{Type{ZScoreTransform},AbstractArray{#s4,2}%20where%20#s4%3C:Real}),

The default is nothing, which is equivalent to dims=2 with a deprecation warning.

so either the docs need updating or dims should be made a required keyword argument.

wildart added a commit to wildart/StatsBase.jl that referenced this issue Aug 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant