-
Notifications
You must be signed in to change notification settings - Fork 19
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: Scalar typetracer after reduction #529
base: main
Are you sure you want to change the base?
Conversation
@@ -532,6 +530,11 @@ def f(self, other): | |||
meta = op(other, self._meta) | |||
else: | |||
meta = op(self._meta, other) | |||
if meta.ndim: |
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.
This applies to the scenario, which apparently we hadn't anticipated, that an operation on a scalar produces an array.
Codecov ReportAttention: Patch coverage is
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## main #529 +/- ##
==========================================
- Coverage 93.06% 92.91% -0.16%
==========================================
Files 23 23
Lines 3290 3389 +99
==========================================
+ Hits 3062 3149 +87
- Misses 228 240 +12 ☔ View full report in Codecov by Sentry. |
@@ -570,6 +573,15 @@ def f(*args): | |||
args = tuple( | |||
ak.Array(arg.content) if isinstance(arg, MaybeNone) else arg for arg in args | |||
) | |||
args = tuple( |
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.
Here we account for getting the low-level typetracer through during column optimisation. This is the questionable part.
Fixes #528
This appears to fix the linked issue, but I'm not really sure why a typetracer object is being passed around rather than a high-level Array.