Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial steps towards interactive documentation via JupyterLite #728

Merged
merged 11 commits into from
Mar 28, 2024
Prev Previous commit
Next Next commit
DOC: Move example for pywt.data.demo_signal()
This commit moves the example for the function `pywt.data.demo_signal()` to the doctests for the
function instead of having it inside reST.

This shall render the example interactive through
the use of JupyterLite and the TryExamples
Sphinx directive.
  • Loading branch information
agriyakhetarpal committed Mar 22, 2024
commit 6d1145e4a7c1366c666f4197859c538b591d33d4
9 changes: 0 additions & 9 deletions doc/source/ref/other-functions.rst
Original file line number Diff line number Diff line change
@@ -64,12 +64,3 @@ Each can be loaded via a function of the same name.

.. currentmodule:: pywt.data
.. autofunction:: demo_signal

**Example:**

.. sourcecode:: python

>>> import pywt
>>> camera = pywt.data.camera()
>>> doppler = pywt.data.demo_signal('doppler', 1024)
>>> available_signals = pywt.data.demo_signal('list')
10 changes: 10 additions & 0 deletions pywt/data/_wavelab_signals.py
Original file line number Diff line number Diff line change
@@ -63,6 +63,16 @@ def demo_signal(name='Bumps', n=None):
test signals are provided with permission of Dr. Donoho to encourage
reproducible research.

Examples
--------
>>> import pywt
>>> camera = pywt.data.camera()
>>> doppler = pywt.data.demo_signal('doppler', 1024)
>>> available_signals = pywt.data.demo_signal('list')
>>> print(available_signals)



"""
if name.lower() == 'list':
return _implemented_signals