On 2019-08-06 17:30, TB wrote:
sage: plot(lambda x: x.imag + 2) # Works
sage: plot(lambda x: x.imag() + 2, (x, -3, 3)) # Empty plot

That's "only" an annoyance: you need to use x.imag or x.imag() depending on what x is. That's not a problem of interoperability. And if you really want generic code, you can always write complex(x).imag (at some performance cost). So it's less a problem than Fraction.

To add another data point about triggering unexpected computations,
numpy.array does have .real and .imag properties.

As far as I can see, it doesn't actually use .real or .imag on the objects that it wraps, so again there is no problem here.

--
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-devel/5D4A9F40.9080408%40UGent.be.

Reply via email to