JuliaPy / JuliaPy/SymPy.jl

ParseError in lambdify

Open
#209 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Julia
Stars
282
Forks
59
PR merge metrics
No merged PRs in 30d

Description

I received the following parse error while using lambidify:

```
ParseError("use \"^\" instead of \"**\"")
#parse#234(::Bool, ::Bool, ::Function, ::String, ::Int64) at parse.jl:222
(::Base.#kw##parse)(::Array{Any,1}, ::Base.#parse, ::String, ::Int64) at :0
#parse#235(::Bool, ::Function, ::String) at parse.jl:232
parse(::String) at parse.jl:232
#lambdify#218(::Type{T} where T, ::Dict{Any,Any}, ::Dict{Any,Any}, ::Function, ::SymPy.Sym, ::Array{SymPy.Sym,1}) at lambdify.jl:144
lambdify(::SymPy.Sym, ::Array{SymPy.Sym,1}) at lambdify.jl:143
lambdify(::SymPy.Sym) at lambdify.jl:143
convert(::Type{Function}, ::SymPy.Sym) at types.jl:92
include_string(::String, ::String) at loading.jl:522
include_string(::String, ::String, ::Int64) at eval.jl:30
include_string(::Module, ::String, ::String, ::Int64, ::Vararg{Int64,N} where N) at eval.jl:34
(::Atom.##100#105{String,Int64,String})() at eval.jl:75
withpath(::Atom.##100#105{String,Int64,String}, ::Void) at utils.jl:30
withpath(::Function, ::String) at eval.jl:38
didWriteToREPL(::Atom.##99#104{String,Int64,String}) at repl.jl:129
hideprompt(::Atom.##99#104{String,Int64,String}) at repl.jl:65
macro expansion at eval.jl:73 [inlined]
(::Atom.##98#103{Dict{String,Any}})() at task.jl:80
```
Interestingly, I didn't see any instances of "**" in the symbolic output. Unfortunately, I do not have a minimum working example that produces the error, but I do have my particular use case:

```
using SymPy
@syms d L U x t
str = integrate(cos(t*x)*x^(-1/d -1),x,U^-d,L^-d)
fun = convert(Function,str)
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.