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

C++ refactoring: ak.full_like, ak.zeros_like, ak.ones_like #1293

Merged
merged 9 commits into from
Feb 18, 2022

Conversation

ioanaif
Copy link
Collaborator

@ioanaif ioanaif commented Feb 17, 2022

No description provided.

@codecov
Copy link

codecov bot commented Feb 17, 2022

Codecov Report

Merging #1293 (0e4a6d5) into main (8e68200) will increase coverage by 1.65%.
The diff coverage is 75.35%.

Impacted Files Coverage Δ
src/awkward/_v2/_connect/numba/arrayview.py 96.24% <ø> (ø)
src/awkward/_v2/_connect/numba/layout.py 87.01% <ø> (ø)
src/awkward/_v2/forms/emptyform.py 78.18% <ø> (-0.25%) ⬇️
src/awkward/_v2/operations/convert/ak_from_cupy.py 25.00% <0.00%> (-50.00%) ⬇️
src/awkward/_v2/operations/structure/ak_isclose.py 100.00% <ø> (ø)
src/awkward/_v2/operations/convert/ak_to_cupy.py 8.19% <3.44%> (-66.81%) ⬇️
src/awkward/_v2/operations/describe/ak_backend.py 9.52% <9.52%> (ø)
src/awkward/_v2/contents/unmaskedarray.py 54.95% <25.00%> (-1.12%) ⬇️
src/awkward/_v2/contents/indexedarray.py 58.62% <37.14%> (-2.03%) ⬇️
...c/awkward/_v2/operations/describe/ak_to_backend.py 37.50% <37.50%> (ø)
... and 75 more

Copy link
Member

@jpivarski jpivarski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just one request to loosen the allowed inputs for dtype, then (with a test), you can merge it.

src/awkward/_v2/operations/structure/ak_full_like.py Outdated Show resolved Hide resolved
Copy link
Member

@jpivarski jpivarski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We talked about three changes in Slack,

  • use fill_value = nplike.array([fill_value], dtype=dtype)[0] so that dates get the right granularity
  • dtype == np.dtype(np.bool_) instead of dtype is bool
  • fill_value.view(np.uint8) in the boolean case (or should it be np.int8? maybe it doesn't matter) so that fill_value always has a NumPy type and not a Python type.

When those are done, you can squash and merge!

@ioanaif ioanaif merged commit b8263b4 into main Feb 18, 2022
@ioanaif ioanaif deleted the ioanaif/ak._like branch February 18, 2022 18:01
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 this pull request may close these issues.

2 participants