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

fix: support unflattening a typetracer-backed array at axis != 0 #2657

Merged
merged 2 commits into from
Aug 17, 2023

Conversation

agoose77
Copy link
Collaborator

Fixes #2656

@codecov
Copy link

codecov bot commented Aug 17, 2023

Codecov Report

Merging #2657 (4a8eaf0) into main (f6b8e76) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Additional details and impacted files
Files Changed Coverage Δ
src/awkward/contents/content.py 76.16% <ø> (ø)
src/awkward/contents/numpyarray.py 91.18% <ø> (ø)
src/awkward/index.py 92.02% <100.00%> (ø)
src/awkward/operations/ak_unflatten.py 96.15% <100.00%> (ø)

... and 1 file with indirect coverage changes

@agoose77 agoose77 changed the title fix: support unflattening a typetracer-backed array at axis != 0 fix: support unflattening a typetracer-backed array at axis != 0 Aug 17, 2023
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.

Yes, these make a lot of sense. Go ahead and merge when ready.

Comment on lines -1287 to +1291
and len(self) == len(other)
and (
self.length is unknown_length
or other.length is unknown_length
or self.length == other.length
)
Copy link
Member

Choose a reason for hiding this comment

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

Checkmark!

Comment on lines -1349 to +1352
self._backend.nplike.array_equal(self.data, other.data)
(
not self._backend.nplike.known_data
or self._backend.nplike.array_equal(self.data, other.data)
)
Copy link
Member

Choose a reason for hiding this comment

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

Checkmark!

Comment on lines -223 to +225
self.nplike.array_equal(self.data, other.data)
and self._data.dtype == other.data.dtype
)
not self._nplike.known_data
or self._nplike.array_equal(self.data, other.data)
) and self._data.dtype == other.data.dtype
Copy link
Member

Choose a reason for hiding this comment

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

Checkmark!

Comment on lines -211 to +215
if not backend.index_nplike.array_equal(
inneroffsets[positions], outeroffsets
if (
backend.index_nplike.known_data
and not backend.index_nplike.array_equal(
inneroffsets[positions], outeroffsets
)
Copy link
Member

Choose a reason for hiding this comment

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

Checkmark!

@agoose77 agoose77 temporarily deployed to docs-preview August 17, 2023 19:48 — with GitHub Actions Inactive
@agoose77 agoose77 merged commit 5530433 into main Aug 17, 2023
35 checks passed
@agoose77 agoose77 deleted the agoose77/fix-typetracer-unflatten branch August 17, 2023 19:55
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.

Unflattening typetracer on axis > 0 fails
2 participants