Warning

You are reading the documentation related to the development version. Go here if you are looking for the documentation of the stable release.

spectrochempy.to_array

to_array()[source]

Return a numpy masked array.

Other NDDataset attributes are lost.

Returns

ndarray – The numpy masked array from the NDDataset data.

Examples

>>> dataset = scp.read('wodger.spg')
>>> a = scp.to_array(dataset)

equivalent to:

>>> a = np.ma.array(dataset)

or

>>> a = dataset.masked_data