Skip to content
Merged
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
23 changes: 15 additions & 8 deletions stumpy/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -2117,8 +2117,9 @@ def _preprocess(T, copy=True):
Time series or sequence

copy : bool, default True
A boolean value that indicates whether the process should be done on
input `T` (False) or its copy (True).
A boolean value that indicates whether the process should be performed on
input array `T` (False) or its copy (True). If `T` is a dataframe, then the
data is always copied into a brand new array.

Returns
-------
Expand All @@ -2133,6 +2134,9 @@ def _preprocess(T, copy=True):

T = transpose_dataframe(T)

if "pandas" in str(type(T)):
T = T.to_numpy(copy=True)

if "polars" in str(type(T)):
T = T.to_numpy(writable=True)

Expand Down Expand Up @@ -2170,8 +2174,9 @@ def preprocess(
Window size

copy : bool, default True
A boolean value that indicates whether the process should be done on
input `T` (False) or its copy (True).
A boolean value that indicates whether the process should be performed on
input array `T` (False) or its copy (True). If `T` is a dataframe, then the
data is always copied into a brand new array.

M_T : numpy.ndarray, default None
Rolling mean
Expand Down Expand Up @@ -2233,8 +2238,9 @@ def preprocess_non_normalized(T, m, copy=True):
Window size

copy : bool, default True
A boolean value that indicates whether the process should be done on
input `T` (False) or its copy (True).
A boolean value that indicates whether the process should be performed on
input array `T` (False) or its copy (True). If `T` is a dataframe, then the
data is always copied into a brand new array.

Returns
-------
Expand Down Expand Up @@ -2293,8 +2299,9 @@ def preprocess_diagonal(
corresponding value set to False in this boolean array.

copy : bool, default True
A boolean value that indicates whether the process should be done on
input `T` (False) or its copy (True).
A boolean value that indicates whether the process should be performed on
input array `T` (False) or its copy (True). If `T` is a dataframe, then the
data is always copied into a brand new array.

Returns
-------
Expand Down