Is 0 .< A .< 1 (where A is an array) going away in 0.6 and beyond? Would be good to know.
Reason for asking: version 0.6.0-dev.1924 (Windows 64) warns that this is deprecated.
/Paul S
Is 0 .< A .< 1 (where A is an array) going away in 0.6 and beyond? Would be good to know.
Reason for asking: version 0.6.0-dev.1924 (Windows 64) warns that this is deprecated.
/Paul S
I suspect the answer is “as far you’re concerned, no, it’s not going away.”
I say it that way because I’m interpreting your question as “can I write this expression and have it evaluate to the same thing”, but the deprecation message you’re getting is likely related to deprecation of .<
as a generic function that will be replaced with dot-broadcast syntax. But that’s a change in how that expression gets evaluated, not in what it evaluates to.
I think you’ve found a bug.
julia> 0 .< eye(4) .< 1
WARNING: A::AbstractArray & B::AbstractArray is deprecated, use A .& B instead.
Stacktrace:
[1] depwarn(::String, ::Symbol) at .\deprecated.jl:64
[2] &(::BitArray{2}, ::BitArray{2}) at .\deprecated.jl:50
So it’s not the .<
that is deprecated. But it looks like that chained comparison is getting expanded to (0 .< A) & (A .< 1)
, and the &
there is now deprecated in favor of .&
. Whatever is responsible for that expansion (I think it’s lowering but I could be wrong) wasn’t updated appropriately, and we must not have any chained comparisons of arrays in our tests otherwise we would have noticed by now.