Skip to content

Is PyAny defined in PythonCall.jl? #19

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

Closed
singularitti opened this issue Mar 1, 2023 · 5 comments
Closed

Is PyAny defined in PythonCall.jl? #19

singularitti opened this issue Mar 1, 2023 · 5 comments

Comments

@singularitti
Copy link

Hi, when I was reading your code, I found this line includes type PyAny, which seems to be defined only in PyCall, but not PythonCall:

(f::Figure)(args...; kws...) = pycall(Py(f), PyAny, args...; kws...)

Could it be a typo?

@stevengj
Copy link
Member

stevengj commented Mar 1, 2023

I think this is leftover from the PyPlot/PyCall conversion.

I'm actually not sure why we have this method at all. Are Matplotlib figure objects callable?

@stevengj
Copy link
Member

stevengj commented Mar 1, 2023

Hmm, it stems from JuliaPy/PyPlot.jl@62ff118

@stevengj
Copy link
Member

stevengj commented Mar 1, 2023

Comes from this post on julia-users. Looks like ColorMap objects should be callable, and I added it to Figure for good measure.

@stevengj
Copy link
Member

stevengj commented Mar 1, 2023

Nope, it's not callable. I get:

ERROR: Python: TypeError: 'Figure' object is not callable

so I should probably just delete this method.

@stevengj
Copy link
Member

stevengj commented Mar 1, 2023

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants