-
Notifications
You must be signed in to change notification settings - Fork 10
contour with (x,y) being ranges #8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
It throws an exception, which is not the same as "crashing". |
The problem seems to be
so Matplotlib doesn't mind a PythonCall |
In particular, the problem seems to be that julia> np = pyimport("numpy")
Python module: <module 'numpy' from '/Users/stevenj/.julia/environments/v1.7/.CondaPkg/env/lib/python3.10/site-packages/numpy/__init__.py'>
julia> np.asarray(y, dtype=np.float64)
ERROR: Python: TypeError: ArrayValue.__array__() takes 1 positional argument but 2 were given
Python stacktrace: none
Stacktrace:
[1] pythrow()
@ PythonCall ~/.julia/packages/PythonCall/XgP8G/src/err.jl:94
[2] errcheck
@ ~/.julia/packages/PythonCall/XgP8G/src/err.jl:10 [inlined]
[3] pycallargs
@ ~/.julia/packages/PythonCall/XgP8G/src/abstract/object.jl:154 [inlined]
[4] pycall(f::Py, args::StepRangeLen{Float64, Base.TwicePrecision{Float64}, Base.TwicePrecision{Float64}, Int64}; kwargs::Base.Pairs{Symbol, Py, Tuple{Symbol}, NamedTuple{(:dtype,), Tuple{Py}}})
@ PythonCall ~/.julia/packages/PythonCall/XgP8G/src/abstract/object.jl:165
[5] #_#11
@ ~/.julia/packages/PythonCall/XgP8G/src/Py.jl:360 [inlined]
[6] top-level scope
@ REPL[15]:1
julia> np.asarray(collect(y), dtype=np.float64)
Python ndarray: array([-5., -4., -3., -2., -1., 0., 1., 2., 3., 4., 5.]) |
This works fine: julia> np.asarray(y)
Python ndarray: array([-5., -4., -3., -2., -1., 0., 1., 2., 3., 4., 5.]) So the problem is the |
It looks like the problem is that this |
Closed by JuliaPy/PythonCall.jl@be521aa |
crashes. (In contrast, several other plot types work with ranges, for instance, surf and plot.)
Example:
The text was updated successfully, but these errors were encountered: