-
Notifications
You must be signed in to change notification settings - Fork 65
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
jl.pytruth(np.bool_(False)) == true #321
Comments
Are you sure you're on 0.9.13? This look a lot like an issue that was solved in 0.9.13, and I can't reproduce it: >>> from juliacall import Main as jl
>>> import numpy as np
>>> jl.pytruth(np.bool_(False))
False
>>> jl.pytruth(np.bool_(True))
True Also, what's the actual issue you're having? Because it never really makes sense to do |
My usecase is that I am compiling a super small intro to PythonCall which is going to be presented today evening, where by chance I run into this point. |
I really can't see how you can get this issue on the current version. Are you definitely not on a dev version of PythonCall? What are Also, when I asked about your usecase, I more meant in terms of code. Like I said, doing |
thank you so much for not giving up!! Everything works now. indeed the python kernel I used was not the one I thought I would be using. So I got 0.9.12 there for juliacall.version and yes indeed I was originally using |
Affects: Both
Describe the bug
A clear and concise description of what the bug is. What did you expect? What happened instead?
numpy has its own boolean values see its docs.
Using python, the numpy bools look exactly like normal bools, but are different types.
When using PythonCall/JuliaCall unfortunately numpy bools behaviour entirely differently from normal Python bool. That is very confusing. Especially
I guess this is just a bug with pytruth which actually should return
true
in this case.Your system
Please provide detailed information about your system:
The text was updated successfully, but these errors were encountered: