Home | Trees | Indices | Help |
|
---|
|
Basic support for I/O of one- and two-dimensional numerical arrays to and from plain text files
The text file format is very simple and used by many other programs as well:An array containing only one line or one column is returned as a one-dimensional array on reading. One-dimensional arrays are written as one item per line.
Numbers in files to be read must conform to Python/C syntax. For reading files containing Fortran-style double-precision numbers (exponent prefixed by D), use the module Scientific.IO.FortranFormat.
|
|||
Numeric.array
|
readArray(filename) Read array data from a file |
||
Numeric.array of float
|
readFloatArray(filename) Read array data from a file into an array of floats |
||
Numeric.array of int
|
readIntegerArray(filename) Read array data from a file into an array of integers |
||
writeArray(array,
filename,
mode='w') Write a text representation of an array to a file. |
|||
writeDataSets(datasets,
filename,
separator='') Write multiple datasets to a text file. |
|
Read array data from a file This function works for arbitrary data types (every array element can be given by an arbitrary Python expression), but at the price of being slow. For large arrays, use readFloatArray or readIntegerArray if possible.
|
Read array data from a file into an array of floats
|
Read array data from a file into an array of integers
|
Write a text representation of an array to a file.
|
Write multiple datasets to a text file.
|
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0alpha3 on Fri Oct 6 14:45:40 2006 | http://epydoc.sourceforge.net |