-
Notifications
You must be signed in to change notification settings - Fork 2
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
ValueError raised by reduce_chunk in PyActiveStorage - induced by a chunk of all zeros being treated as all missing? #194
Comments
I think the new unit test should ensure that some chunks are all zeros ... but some are not ... and we get the right answer for version 1 and 2 ... and that it does raise this error with the current code. |
|
There are three issues in play here:
I think your suggestion will address the second ... |
Your write right,. I should have said |
A small put important change pointed out by @bnlawrence that should have made it int the original PR: #197 |
closed via #197 - very good catch and fix, gents 🍺 |
An attempt to do some work on small chunks using PyActiveStorage version 1 raises a ValueError if the values of the array in the chunk is all zeros.
Tracking this down I find the bug occurring here:
because although in this case the
method
issum
, the check ontmp.any()
is returningFalse
because tmp is all zeros, and so we get execution going through the line with#wrong thing returned
. I think this test usingtmp.any
is not doing what the author intended. We need another solution.The text was updated successfully, but these errors were encountered: