-
Notifications
You must be signed in to change notification settings - Fork 21
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 regression: input arrays are not broadcast #61
Conversation
Thanks so much for this @gjoseph92! Sorry we missed your suggestion. #49 got a bit hard to follow by the end. |
Codecov Report
@@ Coverage Diff @@
## master #61 +/- ##
==========================================
- Coverage 84.14% 84.08% -0.07%
==========================================
Files 2 2
Lines 246 245 -1
Branches 77 74 -3
==========================================
- Hits 207 206 -1
Misses 34 34
Partials 5 5
Continue to review full report at Codecov.
|
Thanks @gjoseph92 for catching this! The PR looks good to me, but there some test failures on some environments (all with python 3.7 it seems) of a form where
|
Attempting to reproduce locally (on Ubuntu) suggests that a more recent numpy version will pass on python 3.7, so perhaps any future release of this functionality should just bump the dependencies a bit? |
Thanks for looking into that. Yes, this will require NumPy >= 0.17 so that NEP-18 is active by default. I've updated that in this PR. Incidentally I saw that the NumPy version used in CI is different for all three Python versions; is that intentional? |
Yes, that's so we can provide some CI coverage over multiple versions of NumPy (we do something similar in |
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.
Those pass now, and that explanation makes sense, thanks!
The only cross is from codecov - apparently the coverage somehow decreased slightly, but I think this fix can be merged anyway.
I noticed that #49 introduced a regression where input arrays now all must be the same shape (before, they'd be broadcast when possible). In #49 (comment) I was trying to explain this and a potential fix, but probably wasn't very clear about it.
Here's a test demonstrating the issue; this passes on
HEAD^
(as long as dask is installed from main). I'll push up the rest of the fix in a few hours.cc @TomNicholas @rabernat