Skip to content

Commit

Permalink
Fix matrix expression conversion to use row-major order
Browse files Browse the repository at this point in the history
  • Loading branch information
eswagel committed Nov 13, 2024
1 parent 780ea35 commit 8db116d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "SymbolicsMathLink"
uuid = "7963cd39-1b62-4514-9cf0-788fb5452611"
authors = ["E. Swagel"]
version = "2.0.0"
version = "2.0.1"

[deps]
MathLink = "18c93696-a329-5786-9845-8443133fa0b4"
Expand Down
2 changes: 1 addition & 1 deletion src/Header/expr_to_mathematica.jl
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ end
(expr_to_mathematica(num::T)::T) where {T<:Mtypes}=num
expr_to_mathematica(eq::Equation)::MathLink.WExpr=MathLink.WSymbol("Equal")(expr_to_mathematica(Symbolics.toexpr(eq.lhs)::Union{Expr, Symbol, Int, Float64, Rational}),expr_to_mathematica(Symbolics.toexpr(eq.rhs)::Union{Expr, Symbol, Int, Float64, Rational}))
(expr_to_mathematica(vect::Vector{T})::MathLink.WExpr) where T=MathLink.WSymbol("List")(expr_to_mathematica.(vect)...)
(expr_to_mathematica(mat::Matrix{T})::MathLink.WExpr) where T = expr_to_mathematica([mat[:,i] for i in 1:size(mat,2)])
(expr_to_mathematica(mat::Matrix{T})::MathLink.WExpr) where T = expr_to_mathematica([mat[i, :] for i in 1:size(mat,1)])
expr_to_mathematica(num::Num)::Mtypes=expr_to_mathematica(Symbolics.toexpr(num)::Union{Expr, Symbol, Int, Float64, Rational})
expr_to_mathematica(dict::Dict)::MathLink.WExpr=begin
rules = MathLink.WExpr[]
Expand Down

0 comments on commit 8db116d

Please sign in to comment.