-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
reduce
and foldr
/foldl
are inconsistent for + and empty vectors
#20144
Comments
Related issue is #5797 (comment) |
I'm new to Julia so take all of this with a grain of salt. So the It's defined as So not only would it send I think the check for
Should be an easy fix if I'm right. |
So, the check on I'm gonna go ahead and work on a PR if that's okay. |
Fix behavior of foldr on empty arrays When foldr is called with two arguments and an empty array, mapfoldr does not make a check for empty array and tries to access the first element. This check is present in mapfoldl.
This issue should be closed (see #20160). |
Thanks @Vsart! |
In 0.6,
reduce
andfoldr
/foldl
are inconsistent for empty vectors:The text was updated successfully, but these errors were encountered: