diff --git a/aeon/datasets/_data_loaders.py b/aeon/datasets/_data_loaders.py index ed0ed4ec39..d4c20b5cf8 100644 --- a/aeon/datasets/_data_loaders.py +++ b/aeon/datasets/_data_loaders.py @@ -234,6 +234,7 @@ def load_from_ts_file( replace_missing_vals_with="NaN", return_meta_data=False, return_type="auto", + encoding="utf-8", ): """Load time series .ts file into X and (optionally) y. @@ -250,6 +251,8 @@ def load_from_ts_file( If "auto", returns numpy3D for equal length and list of numpy2D for unequal. If "numpy2D", will squash a univariate equal length into a numpy2D (n_cases, n_timepoints). Other options are available but not supported medium term. + encoding: str + name of the encoding used to read file with the open function. Returns ------- @@ -274,7 +277,7 @@ def load_from_ts_file( if not ext: full_file_path_and_name = root + ".ts" # Open file - with open(full_file_path_and_name, encoding="utf-8") as file: + with open(full_file_path_and_name, encoding=encoding) as file: # Read in headers meta_data = _load_header_info(file) # load into list of numpy