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

show method should be parseable #977

Open
cscherrer opened this issue Sep 20, 2019 · 1 comment · May be fixed by #823
Open

show method should be parseable #977

cscherrer opened this issue Sep 20, 2019 · 1 comment · May be fixed by #823

Comments

@cscherrer
Copy link

When possible, it's desirable for the displayed version of an object to parse to that same value. This package does not satisfy this:

julia> Normal(0,1)
Normal{Float64}=0.0, σ=1.0)

julia> Normal{Float64}=0.0, σ=1.0)
ERROR: MethodError: no method matching Normal{Float64}(; μ=0.0, σ=1.0)
Closest candidates are:
  Normal{Float64}(::Any, ::Any) where T at /home/chad/.julia/packages/Distributions/Iltex/src/univariate/continuous/normal.jl:35 got unsupported keyword arguments "μ", "σ"
Stacktrace:
 [1] top-level scope at REPL[18]:1

Could this be changed? Preferably, (μ=0.0, σ=1.0) would be a valid input (that would be pretty great) rather than removing them from the printed output

@matbesancon
Copy link
Member

It's tricky because it needs introducing all the keyword arguments, which is done in #823

@simonbyrne simonbyrne linked a pull request Oct 19, 2019 that will close this issue
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.

2 participants