Skip to content

Commit

Permalink
[FIX] Doc examples (#31)
Browse files Browse the repository at this point in the history
* Update requirements.txt

* Update requirements.txt

* Update .travis.yml

* fix inline examples
  • Loading branch information
nbara committed Feb 23, 2021
1 parent 7a7dfc4 commit 35d79f3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions meegkit/ress.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ def RESS(X, sfreq: int, peak_freq: float, neig_freq: float = 1,
--------
To project the RESS components back into sensor space, one can proceed as
follows:
>>> # First apply RESS
>>> from meegkit.utils import matmul3d # handles 3D matrix multiplication
>>> out, fromRESS, _ = ress.RESS(data, sfreq, peak_freq, return_maps=True)
Expand All @@ -53,6 +54,7 @@ def RESS(X, sfreq: int, peak_freq: float, neig_freq: float = 1,
To transform a new observation into RESS component space (e.g. in the
context of a cross-validation, with separate train/test sets):
>>> # Start by applying RESS to the train set:
>>> out, _, toRESS = ress.RESS(data, sfreq, peak_freq, return_maps=True)
>>> # Then multiply your test data by the toRESS:
Expand Down
4 changes: 2 additions & 2 deletions meegkit/utils/matrix.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,8 @@ def widen_mask(mask, widen=4, axis=0):
Examples
--------
>> test = widen_mask(np.array([False, False, False, True, False], 1)
>> print(test)
>>> test = widen_mask(np.array([False, False, False, True, False], 1)
>>> print(test)
[False False False True True]]
"""
Expand Down

0 comments on commit 35d79f3

Please sign in to comment.