From 7a5a7bae8e75da8ed02ba590eba7500c30da78ea Mon Sep 17 00:00:00 2001 From: briandesilva Date: Fri, 7 Feb 2020 11:07:08 -0800 Subject: [PATCH] Fix remaining sphinx-incompatible docstrings. --- pysindy/feature_library/feature_library.py | 3 ++- pysindy/pysindy.py | 14 +++++++------- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/pysindy/feature_library/feature_library.py b/pysindy/feature_library/feature_library.py index b14ada597..9c7de7e27 100644 --- a/pysindy/feature_library/feature_library.py +++ b/pysindy/feature_library/feature_library.py @@ -11,7 +11,8 @@ class BaseFeatureLibrary(TransformerMixin): """ Base class for feature libraries. - Forces subclasses to implement fit and transform functions. + Forces subclasses to implement `fit`, `transform`, + and `get_feature_names` functions. """ def __init__(self, **kwargs): diff --git a/pysindy/pysindy.py b/pysindy/pysindy.py index 70ed43e57..ec2eefbbf 100644 --- a/pysindy/pysindy.py +++ b/pysindy/pysindy.py @@ -127,8 +127,8 @@ def fit(self, x, t=1, x_dot=None, multiple_trajectories=False): trajectory. Default value is a timestep of 1 between samples. - x_dot: array-like or list of array-like, shape (n_samples, - n_input_features), optional (default None) + x_dot: array-like or list of array-like, shape (n_samples, n_input_features), \ + optional (default None) Optional pre-computed derivatives of the training data. If not provided, the time derivatives of the training data will be computed using the specified differentiation method. If x_dot is @@ -285,8 +285,8 @@ def score( used to compute the time derivatives of the samples if x_dot is not provided. - x_dot: array-like or list of array-like, shape - (n_samples, n_input_features), optional + x_dot: array-like or list of array-like, shape (n_samples, n_input_features), \ + optional Optional pre-computed derivatives of the samples. If provided, these values will be used to compute the score. If not provided, the time derivatives of the training data will be computed using @@ -306,7 +306,7 @@ def score( Returns ------- score: float - Metric function value for the model prediction of x_dot + Metric function value for the model prediction of x_dot. """ if multiple_trajectories: x, x_dot = self.process_multiple_trajectories( @@ -382,7 +382,7 @@ def process_multiple_trajectories(self, x, t, x_dot, return_array=True): def differentiate(self, x, t=1, multiple_trajectories=False): """ - Apply the model's differentiation method to data + Apply the model's differentiation method to data. Parameters ---------- @@ -445,7 +445,7 @@ def simulate(self, x0, t, integrator=odeint, stop_condition=None, **integrator_k Parameters ---------- x0: numpy array, size [n_features] - Initial condition from which to simulate + Initial condition from which to simulate. t: int or numpy array of size [n_samples] If the model is in continuous time, t must be an array of time