ParseError in lambdify
还没有人认领这个 Issue。
评估
调研方向
从 lambdify.jl 的第 143-144 行开始,运行提供的 integrate 和 convert(Function, str) 示例。检查传递给 Julia 的 parse 调用的符号表达式,尤其要关注幂运算的呈现方式。当所报告的用例能够在没有 ParseError 的情况下转换为可调用函数时,即表示完成。
由索引模型根据 Issue 内容生成。
描述
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 <missing>: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)
- 主要语言
- Julia
- 星标
- 282
- 派生
- 59
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
JuliaPy/SymPy.jl 的其他 Issue
-
难度 4/5 3-5 天 新手友好度 35/100
-
难度 2/5 1-3 小时 新手友好度 45/100
-
难度 2/5 1-3 小时 新手友好度 35/100
-
难度 4/5 3-5 天 新手友好度 30/100
-
难度 4/5 3-5 天 新手友好度 35/100
相似的 Issue
-
CI: two jobs fail on the new ubuntu-latest (Ubuntu 26.04) runner image可能已有人在做 @bjarthur 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 86/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 63/100
mojaie/MolecularGraph.jl#151 ·
-
Julia runner test IDs cause false oracle regressions可能已有人在做 @yu-depend 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 76/100
-
bug
难度 2/5 1-3 小时 新手友好度 72/100
-
View of a view is broken可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭
难度 2/5 1-3 小时 新手友好度 68/100
维护者通常 1 天内回复