-
-
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
changed isinteger, isreal, etc. #3071
Conversation
… iscomplex, isbool. renamed integer_valued, real_valued, float64_valued
In general this is good although I'm unclear on why |
It should be equivalent to
|
|
No, I only thought of the alternative after @StefanKarpinski's comment. |
Thanks for doing this! I think I also think it is defensible for |
I would be cool with isinteger, isreal, et al. testing for value. But we could shorten them to isintval and isrealval. Since we consider numbers to be like single-element containers, it makes send that eltype of them would give their type. Again, I'm concerned about what eltype("foo") should be, but in practice it jet doesn't seem to be a big deal. |
I could go along with It is generally best for |
Looking over many function names, it seems that anything over 10 characters starts to seem long. Most times when a name struck me as "just barely ok" it had 10 characters ( |
how about |
Doesn't really read very well. I think let's just go with isinteger and isreal and document it clearly. |
Okay, I've made the changes. However I just had one other thought: another option would be something like
Of course the problem would be how to handle arrays (currently no array methods are defined for |
Yes we might need something like |
I think the definitions of the form In general, it's best to use |
Okay, that should be all of the missing methods. |
I'd like to merge this. Ok with @StefanKarpinski @ViralBShah ? |
Yeah, go for it. |
LGTM. |
changed isinteger, isreal, etc.
From discussion of #3054
iselaiseltype
function (I'm open to a better suggestion for the name)isinteger
,isreal
,iscomplex
,isbool
integer_valued
,real_valued
,float64_valued
toisintegervaluedisinteger
, etc.(I didn't change it to: this is a breaking change.isinteger
as that could cause problems with existing code/matlab & octave users).