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

max and min of bool to return bool like numpy #3864

Closed
ajpotts opened this issue Oct 23, 2024 · 0 comments · Fixed by #3901
Closed

max and min of bool to return bool like numpy #3864

ajpotts opened this issue Oct 23, 2024 · 0 comments · Fixed by #3901
Assignees

Comments

@ajpotts
Copy link
Contributor

ajpotts commented Oct 23, 2024

max and min functions on pdarrays of type bool should return bool to better align with numpy:

In [7]: pda = ak.zeros(size, dtype=dtype)

In [8]: ak.max(pda)
Out[8]: 0

In [9]: type(ak.max(pda))
Out[9]: numpy.int64

In [10]: type(np.max(pda.to_ndarray()))
Out[10]: numpy.bool_
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

Successfully merging a pull request may close this issue.

1 participant