[Numpy-discussion] [Announce] Numpy 1.3.0b1

Robert Pyle rpyle@post.harvard....
Thu Mar 19 12:19:18 CDT 2009

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,  
     x_basic = np.logspace(dtype(-3.).real, -1e-8, 10)

     print x_series

if __name__ == "__main__" :

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!


More information about the Numpy-discussion mailing list