Julia: deprecate `isreal(::AbstractArray)`?

Created on 9 Mar 2018  路  6Comments  路  Source: JuliaLang/julia

In 0.6 we deprecated isinteger(a::AbstractArray) to all(isinteger, a). However we still have such a method for isreal.

If any and all had inbounds annotations, then we would be able to optimize these to constants.

arrays broadcast deprecation

Most helpful comment

@nalimilan, no. You wouldn't say that [1,2,3] "is an integer". You would say that it "is real". There is a well defined, standard, sense in which operations like real and conj apply to vectors as a whole, and not just to their contents.

All 6 comments

I believe that was discussed somewhere and IIRC @stevengj was against that change for mathematical reasons.

Oh, ok. Then perhaps this release is converging after all :)

Yes, I still feel the same way.

Don't the same linear algebra considerations apply to both isreal and isinteger? I.e. shouldn't we deprecate both or none of them?

@nalimilan, no. You wouldn't say that [1,2,3] "is an integer". You would say that it "is real". There is a well defined, standard, sense in which operations like real and conj apply to vectors as a whole, and not just to their contents.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Keno picture Keno  路  3Comments

sbromberger picture sbromberger  路  3Comments

i-apellaniz picture i-apellaniz  路  3Comments

yurivish picture yurivish  路  3Comments

omus picture omus  路  3Comments