Paul Kienzle wrote:

> Let me rephrase: Can we have a function sqrt(x) which returns real if x is
> nonnegative, and complex if it is negative?  Similarly for other math 
> functions
> such as log which produce complex values for negative numbers?
> 
> I suppose the numpy list is the place to debate this, but it seems like it
> ought to be a feature of pylab in as much as pylab helps matlab users do
> pythonic things in a familiar environment.

numpy.sqrt() won't do that (we've already discussed it). scipy.sqrt() does,
though. The functions that work like this are in numpy.lib.scimath.

-- 
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless enigma
 that is made terrible by our own mad attempt to interpret it as though it had
 an underlying truth."
  -- Umberto Eco


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel

Reply via email to