### Table Of Contents

- Input and output (`scipy.io`)
  - MATLAB® files
  - IDL® files
  - Matrix Market files
  - Unformatted Fortran files
  - Netcdf
  - Harwell-Boeing files
  - Wav sound files (`scipy.io.wavfile`)
  - Arff files (`scipy.io.arff`)

#### Previous topic

scipy.interpolate.pchip

#### Next topic

scipy.io.loadmat

# Input and output (`scipy.io`)

SciPy has many modules, classes, and functions available to read data from and write data to a variety of file formats.

See also

numpy-reference.routines.io (in Numpy)

## MATLAB® files

`loadmat`(file_name[, mdict, appendmat]) | Load MATLAB file
`savemat`(file_name, mdict[, appendmat, ...]) | Save a dictionary of names and arrays into a MATLAB-style .mat file.
`whosmat`(file_name[, appendmat]) | List variables inside a MATLAB file

## IDL® files

`readsav`(file_name[, idict, python_dict, ...]) | Read an IDL .sav file

## Matrix Market files

`mminfo`(source) | Return size and storage parameters from Matrix Market file-like ‘source’.
`mmread`(source) | Reads the contents of a Matrix Market file-like ‘source’ into a matrix.
`mmwrite`(target, a[, comment, field, ...]) | Writes the sparse or dense array a to Matrix Market file-like target.

## Unformatted Fortran files

`FortranFile`(filename[, mode, header_dtype]) | A file object for unformatted sequential files from Fortran code.

## Netcdf

`netcdf_file`(filename[, mode, mmap, version, ...]) | A file object for NetCDF data.
`netcdf_variable`(data, typecode, size, shape, ...) | A data object for the `netcdf` module.

## Harwell-Boeing files

`hb_read`(file) | Read HB-format file.
`hb_write`(file, m[, hb_info]) | Write HB-format file.

## Wav sound files (`scipy.io.wavfile`)

`read`(filename[, mmap]) | Return the sample rate (in samples/sec) and data from a WAV file
`write`(filename, rate, data) | Write a numpy array as a WAV file
`WavFileWarning` |

## Arff files (`scipy.io.arff`)

`loadarff`(f) | Read an arff file.
`MetaData`(rel, attr) | Small container to keep useful informations on a ARFF dataset.
`ArffError` |
`ParseArffError` |