From 9d2096be500383de31098ae20265841ce1ab454f Mon Sep 17 00:00:00 2001 From: Raphael Vallat Date: Wed, 14 Aug 2019 10:26:34 -0700 Subject: [PATCH] Fixed space/tabs in docstring --- html/hypno.html | 35 ++++++++++++++++------------------- yasa/hypno.py | 10 +++++----- 2 files changed, 21 insertions(+), 24 deletions(-) diff --git a/html/hypno.html b/html/hypno.html index 1a504e4..79b9808 100644 --- a/html/hypno.html +++ b/html/hypno.html @@ -137,15 +137,15 @@

Module yasa.hypno

Parameters ---------- hypno : array_like - The sleep staging (hypnogram) 1D array. + The sleep staging (hypnogram) 1D array. mapping_dict : dict - The mapping dictionnary. Note that this function is - essentially a wrapper around `pandas.Series.map`. + The mapping dictionnary. Note that this function is + essentially a wrapper around `pandas.Series.map`. Returns -------- hypno : array_like - The corresponding integer hypnogram. + The corresponding integer hypnogram. """ assert isinstance(hypno, (list, np.ndarray, pd.Series)), 'Not an array.' hypno = pd.Series(np.asarray(hypno, dtype=int)) @@ -265,7 +265,7 @@

Module yasa.hypno

------- hypno : array_like The hypnogram, upsampled to ``sf_data`` and cropped/padded to - ``data.size``. + ``max(data.shape)``. """ if isinstance(data, mne.io.BaseRaw): sf_data = data.info['sfreq'] @@ -291,19 +291,16 @@

Functions

Parameters

hypno : array_like
-
 
-
The sleep staging (hypnogram) 1D array.
+
The sleep staging (hypnogram) 1D array.
mapping_dict : dict
-
 
+
The mapping dictionnary. Note that this function is +essentially a wrapper around pandas.Series.map.
-

The mapping dictionnary. Note that this function is -essentially a wrapper around pandas.Series.map.

Returns

hypno : array_like
-
 
-
-

The corresponding integer hypnogram.

+
The corresponding integer hypnogram.
+
Source code
def hypno_int_to_str(hypno, mapping_dict={0: 'W', 1: 'N1', 2: 'N2', 3: 'N3',
@@ -315,15 +312,15 @@ 

Returns

Parameters ---------- hypno : array_like - The sleep staging (hypnogram) 1D array. + The sleep staging (hypnogram) 1D array. mapping_dict : dict - The mapping dictionnary. Note that this function is - essentially a wrapper around `pandas.Series.map`. + The mapping dictionnary. Note that this function is + essentially a wrapper around `pandas.Series.map`. Returns -------- hypno : array_like - The corresponding integer hypnogram. + The corresponding integer hypnogram. """ assert isinstance(hypno, (list, np.ndarray, pd.Series)), 'Not an array.' hypno = pd.Series(np.asarray(hypno, dtype=int)) @@ -403,7 +400,7 @@

Returns

hypno : array_like
The hypnogram, upsampled to sf_data and cropped/padded to -data.size.
+max(data.shape).
Source code @@ -431,7 +428,7 @@

Returns

------- hypno : array_like The hypnogram, upsampled to ``sf_data`` and cropped/padded to - ``data.size``. + ``max(data.shape)``. """ if isinstance(data, mne.io.BaseRaw): sf_data = data.info['sfreq'] diff --git a/yasa/hypno.py b/yasa/hypno.py index 1ae0eca..2a62823 100644 --- a/yasa/hypno.py +++ b/yasa/hypno.py @@ -74,15 +74,15 @@ def hypno_int_to_str(hypno, mapping_dict={0: 'W', 1: 'N1', 2: 'N2', 3: 'N3', Parameters ---------- hypno : array_like - The sleep staging (hypnogram) 1D array. + The sleep staging (hypnogram) 1D array. mapping_dict : dict - The mapping dictionnary. Note that this function is - essentially a wrapper around `pandas.Series.map`. + The mapping dictionnary. Note that this function is + essentially a wrapper around `pandas.Series.map`. Returns -------- hypno : array_like - The corresponding integer hypnogram. + The corresponding integer hypnogram. """ assert isinstance(hypno, (list, np.ndarray, pd.Series)), 'Not an array.' hypno = pd.Series(np.asarray(hypno, dtype=int)) @@ -202,7 +202,7 @@ def hypno_upsample_to_data(hypno, sf_hypno, data, sf_data=None): ------- hypno : array_like The hypnogram, upsampled to ``sf_data`` and cropped/padded to - ``data.size``. + ``max(data.shape)``. """ if isinstance(data, mne.io.BaseRaw): sf_data = data.info['sfreq']