diff --git a/Project.toml b/Project.toml index b76b23a..e4d9cc2 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "NonlinearNormalForm" uuid = "05e19671-dec8-4f15-984f-54eaa6ca64be" authors = ["Matt Signorelli"] -version = "0.3.1" +version = "0.3.2" [deps] DelimitedFiles = "8bb1440f-4735-579b-a4ab-409b98df4dab" @@ -26,7 +26,7 @@ Reexport = "1" ReferenceFrameRotations = "3" SkewLinearAlgebra = "1" StaticArrays = "1" -TPSAInterface = "0.2.0" +TPSAInterface = "0.2.1" julia = "1.9" [extras] diff --git a/src/map.jl b/src/map.jl index 63af55f..c5fc13c 100644 --- a/src/map.jl +++ b/src/map.jl @@ -286,15 +286,25 @@ function $t(; init::Union{AbstractTPSAInit,Nothing}=nothing, nv::Union{Integer,Nothing}=nothing, np::Union{Integer,Nothing}=nothing, - v0::Union{AbstractVector,Nothing}=nothing, - v::Union{AbstractVector,Nothing}=nothing, + v0::Union{AbstractArray,Nothing}=nothing, + v::Union{AbstractArray,Nothing}=nothing, v_matrix::Union{AbstractMatrix,UniformScaling,Nothing}=nothing, - q::Union{Quaternion,AbstractVector,UniformScaling,Nothing}=nothing, + q::Union{Quaternion,AbstractArray,UniformScaling,Nothing}=nothing, q_map::Union{AbstractMatrix,Nothing}=nothing, s::Union{AbstractMatrix,Nothing}=nothing, spin::Union{Bool,Nothing}=nothing, stochastic::Union{Bool,Nothing}=nothing, ) + if !isnothing(v0) && !(v0 isa AbstractVector) + v0 = reshape(v0, (length(v0))) + end + if !isnothing(v) && !(v isa AbstractVector) + v = reshape(v, (length(v))) + end + if !isnothing(q) && q isa AbstractArray && !(q isa AbstractVector) + q = reshape(q, (4)) + end + if isnothing(init) if !isnothing(v) && TI.is_tps_type(eltype(v)) isa TI.IsTPSType init = getinit(first(v))