[SciPy-dev] tanh(j*pi/2)

David Goldsmith d_l_goldsmith@yahoo....
Wed Jun 10 00:46:06 CDT 2009


No, this is what I meant:

>>> N.allclose([N.tanh(N.pi*1j/2)],[N.inf])
False
>>> N.allclose([1/N.tanh(N.pi*1j/2)],[0.])
True

So in this case, one does need to reciprocate first (or am I using N.allclose wrong in the first example?)

I should probably 'Note' this tanh's doc (and other transcendentals that may exhibit this behavior).

DG 
--- On Tue, 6/9/09, Robert Kern <robert.kern@gmail.com> wrote:

> From: Robert Kern <robert.kern@gmail.com>
> Subject: Re: [SciPy-dev] tanh(j*pi/2)
> To: "SciPy Developers List" <scipy-dev@scipy.org>
> Date: Tuesday, June 9, 2009, 10:10 PM
> On Wed, Jun 10, 2009 at 00:06, David
> Goldsmith<d_l_goldsmith@yahoo.com>
> wrote:
> >
> > Understood, thanks.  Just curious: can N.allclose be
> used w/ N.inf, or does one need to reciprocate first?
> 
> In [1]: allclose([inf], [inf])
> Out[1]: True
> 
> The infs are handled specially.
> 
> -- 
> 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
> _______________________________________________
> Scipy-dev mailing list
> Scipy-dev@scipy.org
> http://mail.scipy.org/mailman/listinfo/scipy-dev
> 


      


More information about the Scipy-dev mailing list