[NumPy-Tickets] [NumPy] #1079: add option for header to savetxt

NumPy Trac numpy-tickets@scipy....
Fri Jun 4 10:30:11 CDT 2010

#1079: add option for header to savetxt
 Reporter:  kkuhlman     |       Owner:  somebody    
     Type:  enhancement  |      Status:  needs_review
 Priority:  normal       |   Milestone:  Unscheduled 
Component:  numpy.lib    |     Version:              
 Keywords:  savetxt      |  
Changes (by sczesla):

 * cc: stefan.czesla@… (added)
  * keywords:  => savetxt
  * status:  new => needs_review
  * component:  Other => numpy.lib



 we agree that this kind of option is missing, and it really seems to be a
 quite simple change. We attached a patch (npyio_savetxt.patch, refers to
 revision 8455) providing a more convenient interface, leaving less
 responsibility to the user.

 1) Accepts a string or a sequence of strings as comments to be put at the
 top of
    the file
 2) Can create a csv-like header either applying user supplied column names
    or column names inferred from dtype (in case of recarrays).

 All new keywords are optional, so that existing code will keep working as
 is. Checks
 are implemented, which help to avoid the most common error sources (e.g.
 wrong number
 of column names, forgotten comment character, and newlines).
 We see no risks in applying these improvements, but we are thankful for
 all comments
 and suggestions.

 Stefan & Christian

Ticket URL: <http://projects.scipy.org/numpy/ticket/1079#comment:1>
NumPy <http://projects.scipy.org/numpy>
My example project

More information about the NumPy-Tickets mailing list