-
Notifications
You must be signed in to change notification settings - Fork 2.4k
feat: Add array.eval
#24472
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
base: main
Are you sure you want to change the base?
feat: Add array.eval
#24472
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #24472 +/- ##
========================================
Coverage 81.78% 81.79%
========================================
Files 1681 1684 +3
Lines 228078 228785 +707
Branches 2923 2929 +6
========================================
+ Hits 186533 187129 +596
- Misses 40812 40919 +107
- Partials 733 737 +4 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
b2dec05
to
2f680d3
Compare
.collect() | ||
} else { | ||
(0..ca.len()) | ||
.map(|i| [(i * ca.width()) as IdxSize, ca.width() as IdxSize]) |
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.
Where do we check if len * width < IdxSize::MAX
?
ddf5907
to
d0914d4
Compare
This implements
array.eval
which allows running arbitrary expressions on array elements. This is the counterpart oflist.eval
but for theArray
datatype.The
arr.eval
method by default only allows-for length-preserving expressions to be run and will map from anArray
datatype with a certain width to anotherArray
with the same width.If you want to run any non-length-preserving expression, you can set
as_list=True
which will cause the expression to output aList
.xref: #21302.