    Write a list of arrays to a file.

save_arrays(filename, args, fields=None, ascii=True, clobber=False)
filename - str
args - array of arrays
fields - array of str
ascii - bool, optional
clobber - bool, optional

Write the x and y columns from the default data set to the file 'src.dat':

>>> x = get_indep() >>> y = get_dep() >>> save_arrays('src.dat', [x, y])

Use the column names "r" and "surbri" for the columns:

>>> save_arrays('prof.fits', [x,y], fields=["r", "surbri"], ... ascii=False, clobber=True)

PARAMETERS

The parameters for this function are:

Parameter
Definition
filename
The name of the file to write the array to.
args
The arrays to write out.
fields
The column names (should match the size of `args` ).
ascii
If False then the data is written as a FITS format binary table. The default is True . The exact format of the output file depends on the I/O library in use (Crates or AstroPy).
clobber
This flag controls whether an existing file can be overwritten ( True ) or if it raises an exception ( False , the default setting).

See the bugs pages on the Sherpa website for an up-to-date listing of known bugs.

December 2023