Skip to content

Commit

Permalink
type assertion bug
Browse files Browse the repository at this point in the history
  • Loading branch information
aarontrowbridge committed May 30, 2024
1 parent 3402bf6 commit 03753f9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/struct_named_trajectory.jl
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ function NamedTrajectory(
kwargs...
)
@assert all([v isa AbstractMatrix || v isa AbstractVector for v values(comps)])
@assert all([eltype(v) isa Real for v values(comps)])
@assert all([eltype(v) <: Real for v values(comps)]) "eltypes are $([eltype(v) for v values(comps)])"
vals = [v isa AbstractVector ? reshape(v, 1, :) : v for v values(comps)]
comps = NamedTuple([(k => v) for (k, v) zip(keys(comps), vals)])
return NamedTrajectory(comps; kwargs...)
Expand Down

0 comments on commit 03753f9

Please sign in to comment.