bmad-sim / NonlinearNormalForm.jl

Nonlinear normal form analysis using truncated power series
https://bmad-sim.github.io/NonlinearNormalForm.jl/
GNU General Public License v3.0
1 stars 0 forks source link

rand(DAMap, spin=true) throws error. #25

Closed DavidSagan closed 4 months ago

DavidSagan commented 4 months ago
julia> d = Descriptor(2,2)  # 2 variables, 2nd order
GTPSA Descriptor
-----------------------
Maximum order:     2
# Variables:       2

julia> m = rand(DAMap, spin=true) # Rand symplectic map including spin
ERROR: MethodError: no method matching rand(::Type{DAMap}; spin::Bool)

Closest candidates are:
  rand(::Type{X}, ::Integer, ::Integer...) where X got unsupported keyword argument "spin"
   @ Random /Applications/Julia-1.10.app/Contents/Resources/julia/share/julia/stdlib/v1.10/Random/src/Random.jl:294
  rand(::Type{X}, ::Tuple{Vararg{Int64, N}} where N) where X got unsupported keyword argument "spin"
   @ Random /Applications/Julia-1.10.app/Contents/Resources/julia/share/julia/stdlib/v1.10/Random/src/Random.jl:291
  rand(::Type{X}) where X got unsupported keyword argument "spin"
   @ Random /Applications/Julia-1.10.app/Contents/Resources/julia/share/julia/stdlib/v1.10/Random/src/Random.jl:261
  ...

Stacktrace:
 [1] top-level scope
   @ REPL[6]:1
mattsignorelli commented 4 months ago

This I added yesterday for the example, but haven't pushed yet. Will push soon

mattsignorelli commented 4 months ago

1e753fb