https://discourse.julialang.org/t/extrema-x-dims-1-and-nans/73764
julia> extrema([1 NaN; NaN 1],dims=1)
1×2 Matrix{Tuple{Float64, Float64}}:
(1.0, 1.0) (NaN, NaN)
The NaNs are ignored except when they appear in the leading position. This behavior deviates from that of minimum/maximum.
There is no issue with dims=:, which is the default, since that routes through the generic iterator method rather than the per-dimension method.
Tangentially related to #35308, but I'm filing a new issue since the manifestations are different and the fixes might be, too.
https://discourse.julialang.org/t/extrema-x-dims-1-and-nans/73764
The
NaNs are ignored except when they appear in the leading position. This behavior deviates from that ofminimum/maximum.There is no issue with
dims=:, which is the default, since that routes through the generic iterator method rather than the per-dimension method.Tangentially related to #35308, but I'm filing a new issue since the manifestations are different and the fixes might be, too.