-
-
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
minimum(z) gives TypeError: non-boolean (Missing) used in boolean context if z is large and contains missings #35939
Comments
cc @pdeffebach |
I'm on 1.4.0, Ubuntu 19.10. This is a weird bug. I would need to work a bit more to figure out if it's the absolute number of
|
The line that throws the error is here: Line 576 in f0dd781
|
Here is a full MWE to confirm. If an array is large enough that When it batches the computation, 4 values Then it checks that none of these The reason this error is not deterministic is because it only performs this check on the first 4 values of each batch. When the array is small, there is only one batch, so there is only an error if the first value is missing. If the array is large, then the I confirm this with a new
|
Oh... that function is not generic! One could try Is the short circuit really that important? Would people be relying on this optimization in their hot path? |
This was fixed in #35989 (Julia 1.6). |
This works:
returns
missing
.This doesn't work:
Me and Peter Deffebach were trying to come up with a MWE. The process made me think that the problem depends on the size of the array. The problem persists for 3 dimensional arrays as well, so I assume it is independent of array dimension.
I'm on Julia 1.4.0, Windows 10.
The text was updated successfully, but these errors were encountered: