Describe the bug 🐞
Seems like any does not behave correctly for ArrayPartition
Expected behavior
any(isnan, ArrayPartition([ NaN ], [ NaN ])) should return true, but currently returns false
Minimal Reproducible Example 👇
julia> using RecursiveArrayTools
julia> p = ArrayPartition([ NaN ], [ NaN ])
([NaN], [NaN])
julia> collect(p)
2-element Vector{Float64}:
NaN
NaN
julia> any(isnan, p)
false
julia> any(isnan, collect(p))
true
Interestingly enough, all does behave correctly
julia> p = ArrayPartition([ NaN ], [ NaN ])
([NaN], [NaN])
julia> all(isnan, p)
true
julia> p = ArrayPartition([ NaN ], [ 2.0 ])
([NaN], [2.0])
julia> all(isnan, p)
false
Environment (please complete the following information):
- Output of
using Pkg; Pkg.status()
(@temp) pkg> st
Status `~/.julia/environments/temp/Project.toml`
⌃ [731186ca] RecursiveArrayTools v3.23.1
julia> versioninfo()
Julia Version 1.10.4
Commit 48d4fd48430 (2024-06-04 10:41 UTC)
Build Info:
Official https://julialang.org/ release
Platform Info:
OS: macOS (arm64-apple-darwin22.4.0)
CPU: 11 × Apple M3 Pro
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-15.0.7 (ORCJIT, apple-m1)
Threads: 1 default, 0 interactive, 1 GC (on 5 virtual cores)
Additional context
Add any other context about the problem here.
Describe the bug 🐞
Seems like
anydoes not behave correctly forArrayPartitionExpected behavior
any(isnan, ArrayPartition([ NaN ], [ NaN ]))should returntrue, but currently returnsfalseMinimal Reproducible Example 👇
Interestingly enough,
alldoes behave correctlyEnvironment (please complete the following information):
using Pkg; Pkg.status()versioninfo()Additional context
Add any other context about the problem here.