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.load

load(filename, **kwargs)[source]

Open data from a ‘*.scp’ (NDDataset) or ‘*.pscp’ (Project) file.

Parameters
  • filename (str , pathlib or file objects) – The name of the file to read (or a file objects).

  • **kwargs – Optional keyword parameters (see Other Parameters).

Other Parameters

content (str, optional) – The optional content of the file(s) to be loaded as a binary string.

See also

read

Import dataset from various orgines.

save

Save the current dataset.

Notes

Adapted from numpy.load .

Examples

>>> nd1 = scp.read('irdata/nh4y-activation.spg')
>>> f = nd1.save()
>>> f.name
'nh4y-activation.scp'
>>> nd2 = scp.load(f)

Alternatively, this method can be called as a class method of NDDataset or Project object:

>>> from spectrochempy import *
>>> nd2 = NDDataset.load(f)