[Scipy-tickets] [SciPy] #1409: Calling polyfit causing error in python string conversions

SciPy Trac scipy-tickets@scipy....
Mon Mar 14 19:03:27 CDT 2011


#1409: Calling polyfit causing error in python string conversions
------------------------------+---------------------------------------------
 Reporter:  NuclearXRayLaser  |       Owner:  somebody
     Type:  defect            |      Status:  new     
 Priority:  normal            |   Milestone:          
Component:  Other             |     Version:  0.9.0   
 Keywords:                    |  
------------------------------+---------------------------------------------
 Problem on Win XP, scipy 0.9.0 rc1, numpy 1.5.1
 Python 2.7.1 (r271:86832, Nov 27 2010, 18:30:46) [MSC v.1500 32 bit
 (Intel)] on win32.

 Does not repeat on a pc with same numpy/scipy but slightly older python
 version.
 *** Python 2.7 (r27:82525, Jul  4 2010, 09:01:59) [MSC v.1500 32 bit
 (Intel)] on win32. ***

 Here is some sample code
 import scipy

 print "%.*e" % (2, 1e-6,) # ok here

 a, b = scipy.polyfit([0,1,2], [1, 2, 3,], 1) # something bad happens here
 print "%.*e" % (2, 1.e-6,) # returns "ERR"
 print "%.*e" % (2, 1.0000001e-6,) # works
 print "%.*e" % (2, 1e-7,) # returns "ERR"
 print "%.*e" % (2, 1e-8,) # works

-- 
Ticket URL: <http://projects.scipy.org/scipy/ticket/1409>
SciPy <http://www.scipy.org>
SciPy is open-source software for mathematics, science, and engineering.


More information about the Scipy-tickets mailing list