Some examples in `README` still don't work with `PyPlot`
hammerfunctor opened this issue · comments
hammerfunctor commented
After #11, there is some other errors. Below is an example, and similar situations like no method matching iterate(::Fatou.Rectangle)
also appear elsewhere.
julia> newton(:(z^3-1),n=800,ϵ=0.1,N=25,iter=true,cmap="jet") |> fatou |> plot
0.137883 seconds (55.66 k allocations: 3.189 MiB, 56.83% compilation time)
ERROR: (in a Julia function called from Python)
JULIA: MethodError: no method matching iterate(::Fatou.Rectangle)
Closest candidates are:
iterate(!Matched::Union{LinRange, StepRangeLen}) at range.jl:664
iterate(!Matched::Union{LinRange, StepRangeLen}, !Matched::Int64) at range.jl:664
iterate(!Matched::T) where T<:Union{Base.KeySet{var"#s79", var"#s78"} where {var"#s79", var"#s78"<:Dict}, Base.ValueIterator{var"#s77"} where var"#s77"<:Dict} at dict.jl:693
...
Stacktrace:
[1] jlwrap_iterator(o::Fatou.Rectangle)
@ PyCall ~/.julia/packages/PyCall/BD546/src/pyiterator.jl:144
[2] pyjlwrap_getiter(self_::Ptr{PyCall.PyObject_struct})
@ PyCall ~/.julia/packages/PyCall/BD546/src/pyiterator.jl:125
[3] macro expansion
@ ~/.julia/packages/PyCall/BD546/src/exception.jl:95 [inlined]
[4] #107
@ ~/.julia/packages/PyCall/BD546/src/pyfncall.jl:43 [inlined]
[5] disable_sigint
@ ./c.jl:458 [inlined]
[6] __pycall!
@ ~/.julia/packages/PyCall/BD546/src/pyfncall.jl:42 [inlined]
[7] _pycall!(ret::PyCall.PyObject, o::PyCall.PyObject, args::Tuple{Matrix{UInt16}}, nargs::Int64, kw::PyCall.PyObject)
@ PyCall ~/.julia/packages/PyCall/BD546/src/pyfncall.jl:29
[8] _pycall!(ret::PyCall.PyObject, o::PyCall.PyObject, args::Tuple{Matrix{UInt16}}, kwargs::Base.Iterators.Pairs{Symbol, Any, Tuple{Symbol, Symbol}, NamedTuple{(:cmap, :extent), Tuple{String, Fatou.Rectangle}}})
@ PyCall ~/.julia/packages/PyCall/BD546/src/pyfncall.jl:11
[9] #pycall#113
@ ~/.julia/packages/PyCall/BD546/src/pyfncall.jl:83 [inlined]
[10] imshow(args::Matrix{UInt16}; kws::Base.Iterators.Pairs{Symbol, Any, Tuple{Symbol, Symbol}, NamedTuple{(:cmap, :extent), Tuple{String, Fatou.Rectangle}}})
@ PyPlot ~/.julia/packages/PyPlot/XHEG0/src/PyPlot.jl:177
[11] imshow(K::Fatou.FilledSet{SyntaxTree.var"#41#42", SyntaxTree.var"#43#44", SyntaxTree.var"#45#46", false, true, false, false}; cmap::String, bare::Bool)
@ Fatou ~/.julia/dev/Fatou/src/pyplot.jl:9
[12] #plot#40
@ ~/.julia/dev/Fatou/src/pyplot.jl:4 [inlined]
[13] plot
@ ~/.julia/dev/Fatou/src/pyplot.jl:4 [inlined]
[14] |>(x::Fatou.FilledSet{SyntaxTree.var"#41#42", SyntaxTree.var"#43#44", SyntaxTree.var"#45#46", false, true, false, false}, f::typeof(plot))
@ Base ./operators.jl:858
[15] top-level scope
@ REPL[12]:1
[16] eval
@ ./boot.jl:360 [inlined]
[17] eval_user_input(ast::Any, backend::REPL.REPLBackend)
@ REPL /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.6/REPL/src/REPL.jl:139
[18] repl_backend_loop(backend::REPL.REPLBackend)
@ REPL /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.6/REPL/src/REPL.jl:200
[19] start_repl_backend(backend::REPL.REPLBackend, consumer::Any)
@ REPL /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.6/REPL/src/REPL.jl:185
[20] run_repl(repl::REPL.AbstractREPL, consumer::Any; backend_on_current_task::Bool)
@ REPL /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.6/REPL/src/REPL.jl:317
[21] run_repl(repl::REPL.AbstractREPL, consumer::Any)
@ REPL /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.6/REPL/src/REPL.jl:305
[22] (::Base.var"#874#876"{Bool, Bool, Bool})(REPL::Module)
@ Base ./client.jl:387
[23] #invokelatest#2
@ ./essentials.jl:708 [inlined]
[24] invokelatest
@ ./essentials.jl:706 [inlined]
[25] run_main_repl(interactive::Bool, quiet::Bool, banner::Bool, history_file::Bool, color_set::Bool)
@ Base ./client.jl:372
[26] exec_options(opts::Base.JLOptions)
@ Base ./client.jl:302
[27] _start()
@ Base ./client.jl:485
Stacktrace:
[1] pyerr_check
@ ~/.julia/packages/PyCall/BD546/src/exception.jl:62 [inlined]
[2] pyerr_check
@ ~/.julia/packages/PyCall/BD546/src/exception.jl:66 [inlined]
[3] _handle_error(msg::String)
@ PyCall ~/.julia/packages/PyCall/BD546/src/exception.jl:83
[4] macro expansion
@ ~/.julia/packages/PyCall/BD546/src/exception.jl:97 [inlined]
[5] #107
@ ~/.julia/packages/PyCall/BD546/src/pyfncall.jl:43 [inlined]
[6] disable_sigint
@ ./c.jl:458 [inlined]
[7] __pycall!
@ ~/.julia/packages/PyCall/BD546/src/pyfncall.jl:42 [inlined]
[8] _pycall!(ret::PyCall.PyObject, o::PyCall.PyObject, args::Tuple{Matrix{UInt16}}, nargs::Int64, kw::PyCall.PyObject)
@ PyCall ~/.julia/packages/PyCall/BD546/src/pyfncall.jl:29
[9] _pycall!(ret::PyCall.PyObject, o::PyCall.PyObject, args::Tuple{Matrix{UInt16}}, kwargs::Base.Iterators.Pairs{Symbol, Any, Tuple{Symbol, Symbol}, NamedTuple{(:cmap, :extent), Tuple{String, Fatou.Rectangle}}})
@ PyCall ~/.julia/packages/PyCall/BD546/src/pyfncall.jl:11
[10] #pycall#113
@ ~/.julia/packages/PyCall/BD546/src/pyfncall.jl:83 [inlined]
[11] imshow(args::Matrix{UInt16}; kws::Base.Iterators.Pairs{Symbol, Any, Tuple{Symbol, Symbol}, NamedTuple{(:cmap, :extent), Tuple{String, Fatou.Rectangle}}})
@ PyPlot ~/.julia/packages/PyPlot/XHEG0/src/PyPlot.jl:177
[12] imshow(K::Fatou.FilledSet{SyntaxTree.var"#41#42", SyntaxTree.var"#43#44", SyntaxTree.var"#45#46", false, true, false, false}; cmap::String, bare::Bool)
@ Fatou ~/.julia/dev/Fatou/src/pyplot.jl:9
[13] #plot#40
@ ~/.julia/dev/Fatou/src/pyplot.jl:4 [inlined]
[14] plot
@ ~/.julia/dev/Fatou/src/pyplot.jl:4 [inlined]
[15] |>(x::Fatou.FilledSet{SyntaxTree.var"#41#42", SyntaxTree.var"#43#44", SyntaxTree.var"#45#46", false, true, false, false}, f::typeof(plot))
@ Base ./operators.jl:858
[16] top-level scope
@ REPL[12]:1
Dream Scatter commented
Thanks again, I recently switched this repository over to Makie
and changed some of the API and didn't test all the PyPlot
.
It should all be fixed now.