plotpy.io

The io module provides input/output helper functions:

Reference

plotpy.io.imread(fname, ext=None, to_grayscale=False)[source]

Return a NumPy array from an image filename fname.

If to_grayscale is True, convert RGB images to grayscale The ext (optional) argument is a string that specifies the file extension which defines the input format: when not specified, the input format is guessed from filename.

plotpy.io.imwrite(fname, arr, ext=None, dtype=None, max_range=None, **kwargs)[source]

Save a NumPy array to an image filename fname.

If to_grayscale is True, convert RGB images to grayscale The ext (optional) argument is a string that specifies the file extension which defines the input format: when not specified, the input format is guessed from filename. If max_range is True, array data is scaled to fit the dtype (or data type itself if dtype is None) dynamic range Warning: option max_range changes data in place

plotpy.io.load_items(reader)[source]

Load items from HDF5 file: * reader: guidata.hdf5io.HDF5Reader object

plotpy.io.save_items(writer, items)[source]

Save items to HDF5 file: * writer: guidata.hdf5io.HDF5Writer object * items: serializable plot items