io

ardent.io.save(data, file_path)[source]

Save data to file_path

Parameters:
  • data (np.ndarray, dict) -- An array or a dictionary with np.ndarray values to be saved.
  • file_path (str, Path) -- The file path that data will be saved to. Accepts an arbitrary suffix but provides .vtk by default.
Raises:

Exception -- Raised if _validate_inputs has failed to catch an improper type for data.

ardent.io.load(file_path)[source]

Load data from file_path.

Parameters:file_path (str, Path) -- The file path from which data will be retrieved.
Returns:The array or dict of arrays saved at file_path.
Return type:np.ndarray, dict
ardent.io.save_pickled(obj, file_path)[source]

Pickle object obj and save it to file_path.

Parameters:
  • obj (object) -- The pickleable object to be saved.
  • file_path (str, Path) -- The file path at which to save obj.
ardent.io.load_pickled(file_path)[source]

Load pickled object from file_path.

Parameters:file_path (str, Path) -- The file path at which a pickled object is saved.
Returns:The pickled object saved at file_path.
Return type:object