-
Notifications
You must be signed in to change notification settings - Fork 83
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
Conversation
Codecov Report
Additional details and impacted files
|
axis != 0
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.
Yes, these make a lot of sense. Go ahead and merge when ready.
and len(self) == len(other) | ||
and ( | ||
self.length is unknown_length | ||
or other.length is unknown_length | ||
or self.length == other.length | ||
) |
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.
Checkmark!
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) | ||
) |
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.
Checkmark!
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 |
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.
Checkmark!
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 | ||
) |
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.
Checkmark!
Fixes #2656