From e49b71a2cd96779d9b39dbce9efc9dabcd76dd0d Mon Sep 17 00:00:00 2001 From: jvdd Date: Sat, 14 Oct 2023 13:19:46 +0200 Subject: [PATCH] :pen: extend docs --- tsflex/features/feature_collection.py | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/tsflex/features/feature_collection.py b/tsflex/features/feature_collection.py index 48d26951..4bc237fa 100644 --- a/tsflex/features/feature_collection.py +++ b/tsflex/features/feature_collection.py @@ -594,6 +594,8 @@ def _calculate_group_by_consecutive( Whether the output needs to be a DataFrame or a list thereof, by default False. If `True` the output dataframes will be merged to a DataFrame with an outer merge. + **calculate_kwargs: + Keyword arguments that will be passed to the `calculate` method. .. Note:: Is comparable to following pseudo-SQL code: @@ -663,9 +665,25 @@ def _calculate_group_by_consecutive( @staticmethod def _process_njobs(n_jobs: Union[int, None], nb_funcs: int) -> int: - if ( - os.name == "nt" - ): # On Windows no multiprocessing is supported, see https://github.com/predict-idlab/tsflex/issues/51 + """Process the number of jobs to run in parallel. + + On Windows no multiprocessing is supported, see + https://github.com/predict-idlab/tsflex/issues/51 + + Parameters + ---------- + n_jobs : Union[int, None] + The number of jobs to run in parallel. + nb_funcs : int + The number of feature functions. + + Returns + ------- + int + The number of jobs to run in parallel. + + """ + if os.name == "nt": # On Windows no multiprocessing is supported n_jobs = 1 elif n_jobs is None: n_jobs = os.cpu_count()