[Scipy-tickets] [SciPy] #1367: using rptfile= with an existing file causes a Fortran runtime error

SciPy Trac scipy-tickets@scipy....
Mon Jan 17 16:47:52 CST 2011


#1367: using rptfile= with an existing file causes a Fortran runtime error
-----------------------+----------------------------------------------------
 Reporter:  kaufman    |       Owner:  cdavid
     Type:  defect     |      Status:  new   
 Priority:  normal     |   Milestone:  0.9.0 
Component:  scipy.odr  |     Version:  0.8.0 
 Keywords:             |  
-----------------------+----------------------------------------------------
 {{{
 from numpy import *
 import scipy.odr as odr

 def func(B,x):
   return B[0] + B[1] * x

 p = odr.Model(func)
 data = odr.Data(arange(10),12 * arange(10))
 o = odr.ODR(data, p, beta0=[0.1,13], rptfile='report.dat')
 o.run().pprint()
 }}}

 if a report.dat exists, then we get:

 {{{
 % python test.py
 At line 7 of file scipy/odr/odrpack/dlunoc.f (unit = 19, file = '')
 Fortran runtime error: File 'report.dat' already exists
 %
 }}}

 I think that proper behavior would be an overwrite, or a overwrite= option
 should be added.

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


More information about the Scipy-tickets mailing list