[Numpy-discussion] [Announce] Numpy 1.3.0b1
Charles R Harris
charlesr.harris@gmail....
Thu Mar 19 12:24:46 CDT 2009
On Thu, Mar 19, 2009 at 11:19 AM, Robert Pyle <rpyle@post.harvard.edu>wrote:
> Hi Chuck,
> On Mar 19, 2009, at 1:01 PM, Charles R Harris wrote:
> > Is that any help?
> >
> > Not yet ;) I think there is a problem with the range of values in x
> > that might have their source in the finfo values. So it would help
> > if you could pin down just where x goes wrong by printing it out.
> > That is what the short script that a included in the ticket comments
> > does. Mind, I think you will need to do a bit of exploration. I
> > don't think the failures are significant in that it probably doesn't
> > need to test the range of values that it does, but it would be nice
> > to understand precisely why it fails.
>
> Sorry. I didn't read clear to the end of the ticket. I assume the
> script you mean is
> ----------------------------------------------------------------
> #! /usr/bin/env python
> import numpy as np
>
> def check_loss_of_precision(dtype):
> """Check loss of precision in complex arc* functions"""
>
> # Check against known-good functions
>
> info = np.finfo(dtype)
> real_dtype = dtype(0.).real.dtype
> eps = info.eps
>
> x_series = np.logspace(np.log10(info.tiny/eps).real, -3, 200,
> endpoint=False)
> x_basic = np.logspace(dtype(-3.).real, -1e-8, 10)
>
> print x_series
>
> if __name__ == "__main__" :
> check_loss_of_precision(np.longcomplex)
> ----------------------------------------------------------------
>
>
> When I run this, it says x_series is an array of 200 NaNs. That would
> certainly explain why the assertion in test_umath.py failed!
>
Yep, that's it. Can you see what info.tiny/eps is in this case. Also
info.tiny and eps separately.
Chuck
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/numpy-discussion/attachments/20090319/6cb463c7/attachment.html
More information about the Numpy-discussion
mailing list