Skip to content
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

np.bool_ does not convert to julia Bool #502

Closed
willow-ahrens opened this issue May 22, 2024 · 4 comments
Closed

np.bool_ does not convert to julia Bool #502

willow-ahrens opened this issue May 22, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@willow-ahrens
Copy link

willow-ahrens commented May 22, 2024

Affects: Both

Describe the bug
We expected np.bool_ to convert to julia Bool, just like all the other np.int32 and np.float64, but instead we get an Array{Bool, 0}

>>> import juliacall

>>> jl.println(np.int_(1))
1
>>> jl.println(int(1))
1
>>> jl.println(np.True_)
fill(true)
>>> jl.println(True)
true

Your system
juliacall = "^0.9.15", several operating systems

Additional context
Thank you for maintaining such an awesome piece of software. This occurs in willow-ahrens/finch-tensor#54

@willow-ahrens willow-ahrens added the bug Something isn't working label May 22, 2024
@willow-ahrens
Copy link
Author

Happy to file a PR if you point me where to look

@willow-ahrens
Copy link
Author

is this just because bool is missing from

("int16", Int16),
?

@cjdoris
Copy link
Collaborator

cjdoris commented May 22, 2024

Thanks - it was indeed an oversight. I've fixed it on main now.

@cjdoris cjdoris closed this as completed May 22, 2024
@willow-ahrens
Copy link
Author

Thanks so much for the quick fix! I'll let my team know!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants