Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion aeon/datasets/_data_loaders.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand All @@ -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
-------
Expand All @@ -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
Expand Down