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

Issue with introductory example #99

Closed
rahulunair opened this issue Aug 10, 2022 · 2 comments · Fixed by #100
Closed

Issue with introductory example #99

rahulunair opened this issue Aug 10, 2022 · 2 comments · Fixed by #100

Comments

@rahulunair
Copy link
Contributor

There is an issue when we are passing StaticInt to randn (See below stack trace), the fix could be multiplying with 1. I am pushing a patch for the same, kindly let me know if that fix is good enough. I am able to run the example with that change.

julia> p = randn(SimpleChains.numparam(schain))
ERROR: MethodError: no method matching randn(::Static.StaticInt{216})
Closest candidates are:
  randn() at /usr/local/bin/julia-1.7.3/share/julia/stdlib/v1.7/Random/src/normal.jl:38
  randn(::Integer...) at /usr/local/bin/julia-1.7.3/share/julia/stdlib/v1.7/Random/src/normal.jl:244
  randn(::Tuple{Vararg{Int64, N}} where N) at /usr/local/bin/julia-1.7.3/share/julia/stdlib/v1.7/Random/src/normal.jl:243
  ...
Stacktrace:
 [1] top-level scope
   @ REPL[28]:1
rahulunair added a commit to rahulunair/SimpleChains.jl that referenced this issue Aug 10, 2022
Passing StaticInt to randn fails, this patch fixes the example.

fixes: PumasAI#99
@chriselrod
Copy link
Contributor

It should be using init_patams instead

@rahulunair
Copy link
Contributor Author

Hi @chriselrod , thank you for the comment, I have updated the PR, kindly review and let me know if it makes sense.

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