# Module Scientific.IO.ArrayIO

This module contains elementary 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:

- each line corresponds to one row of the array

- the numbers within a line are separated by white space

- lines starting with # are ignored (comment lines)

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.

## Functions

- readArray(filename)

  Return an array containing the data from file filename.

- writeArray(array, filename)

  Write array a to file filename.

- writeDataSets(datasets, filename, separator=`''`)

  Write each of the items in the sequence datasets to the file filename, separating the datasets by a line containing separator. The items in the data sets can be one- or two-dimensional arrays or equivalent nested sequences. The output file format is understood by many plot programs.