Miscellaneous

abapy.misc.dump(data, name, protocol=2)[source]

Dumps an object to file using pickle.

Parameters:
  • data (any) – object to dump.
  • name (string) – file name or path to file.

Note

This function allows clean array pickling whereas standard pickle.dump will raise an error if array.array are in the pickled object (which is the case of all objects in Abapy).

abapy.misc.load(name)[source]

Loads back a pickled object.

Parameters:name (string) – file name or path to file.
Return type:unpickled object

Note

This function allows clean array unpickling whereas standard pickle.load will raise an error if array.array are in the pickled object (which is the case of all objects in Abapy).

abapy.misc.read_file(path, ncol=2, separator=None)[source]

Read a tabular data file and returns a numpy.array containing the data. Header lines must begin with a #.