-
Notifications
You must be signed in to change notification settings - Fork 81
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
fix: set dtype in full_like
#2251
Conversation
@jpivarski I also added support for |
The reason is that sometimes an unknown type fills in for a NumpyArray, and sometimes it fills in for something else. In a situation like this: >>> partition_1 = ak.from_json("[[1.1, 2.2], [3.3]]")
>>> partition_1.type.show()
2 * var * float64
>>>
>>> partition_2 = ak.from_json("[[]]")
>>> partition_2.type.show()
1 * var * unknown
>>>
>>> partition_3 = ak.from_json("[]")
>>> partition_3.type.show()
0 * unknown you wouldn't want to fill in the unknown types as a byproduct of turning the floats into integers or something. You'd want these unknowns to stay unknown until concatenation. But there are other situations in which you want unknown to become numeric, like So I think it would be a good idea for both |
That's a good point, and links to our conversations yesterday! |
48a071e
to
7aebbaa
Compare
Codecov Report
Additional details and impacted files
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I looked over this when it was in the draft stage, and just did again now. I think it's great and ready to be merged!
This PR directly sets
dtype
in thenplike.full_like
call, which I think is all we need to do here.Fixes #2250