Skip to content

jl.pytruth(np.bool_(False)) == true #321

Closed
@schlichtanders

Description

@schlichtanders

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

from juliacall import Main as jl
jl.pytruth(np.bool_(False))  # returns true

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 operating system: Nixos
  • Julia 1.9.0 PythonCall/JuliaCall 0.9.13

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions