Assign data

encore.data.assign_data.assign_data_from_file(var_path: str, filename: str, model_type: str)

Loads a variable form a file given a particular way of finding variables in the file, defined by model_type. Returns None if the model type is not defined.

Parameters:
  • var_path (str) – String with the path to the desired variable. Nested structures are separated using “/”

  • filename (str) – String with the path to the file containing the variable

  • model_type (str) – String defining the variable search type, available options are “hdf5”, “np_flatten”, “pkl”, “mat”, and “csv”

Returns:

Numpy matrix containing the requested variable

Return type:

numpy.ndarray