sympy
sympy copied to clipboard
S.Zero.is_imaginary should be True?
See discussion in #2538 starting from this and #4149.
Having worked more with this I am much more in favor of making S.Zero both real and imaginary, the origin for both real and imaginary scales. Without this, (I*r).is_imaginary for var('r', real=True) has to be None...it would be nice if it were True.
To summarize my opinion from the other threads, I think zero should be imaginary, first, because to me this is the natural definition mathematically, and second, because it makes more inferences possible in the assumptions system (the I*r
case noted by @smichr is a great example of this).
I think we can remove the "needs decision" label. This looks like we've already decided this should be fixed. I've tried, but quickly ran into import issues, so I think I'll leave it for the veterans.
I think we can remove the "needs decision" label.
I think so. For reference, see #8134.
Did we agree on both real and imaginary?
I think it was pretty well agreed that zero should be imaginary (but this was never implemented IIRC). It should not be difficult to fix (much easier than changing the behavior of oo.is_real). I would start with fixing it, so you can get an idea of how the old assumptions work.
Thanks! I think Sergey has already fixed it in his fork of sympy.
Hi, this issue is still not resolved. @skirpichev are you still working on this? I would like to work on this if you're not