Skip to content

Commit

Permalink
DOC: Add custom :button_text: for all examples
Browse files Browse the repository at this point in the history
  • Loading branch information
agriyakhetarpal committed Mar 22, 2024
1 parent 68a2f41 commit 7977ff8
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 0 deletions.
3 changes: 3 additions & 0 deletions doc/source/ref/cwt.rst
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ A variety of continuous wavelets have been implemented. A list of the available
wavelet names compatible with ``cwt`` can be obtained by:

.. try_examples::
:button_text: Try it in your browser!

>>> import pywt
>>> wavelist = pywt.wavelist(kind='continuous')
Expand Down Expand Up @@ -207,6 +208,7 @@ sampled at 100 Hz, a center frequency of 1.0 corresponds to ~100 Hz at
particular wavelet, one would analyze a signal using ``scales >= 2``.

.. try_examples::
:button_text: Try it in your browser!

>>> import numpy as np
>>> import pywt
Expand Down Expand Up @@ -237,6 +239,7 @@ frequency fs. This function is useful for specifying the transform as a function
of frequency directly.

.. try_examples::
:button_text: Try it in your browser!

>>> import numpy as np
>>> import pywt
Expand Down
2 changes: 2 additions & 0 deletions doc/source/ref/signal-extension-modes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ computations can be performed with the `periodization`_ mode:
**Example:**

.. try_examples::
:button_text: Try it in your browser!

>>> import pywt
>>> print(pywt.Modes.modes)
Expand All @@ -105,6 +106,7 @@ Notice that you can use any of the following ways of passing wavelet and mode
parameters:

.. try_examples::
:button_text: Try it in your browser!

>>> import pywt
>>> (a, d) = pywt.dwt([1,2,3,4,5,6], 'db2', 'smooth')
Expand Down
9 changes: 9 additions & 0 deletions doc/source/ref/wavelets.rst
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ Custom discrete wavelets are also supported through the
**Example:**

.. try_examples::
:button_text: Try it in your browser!

>>> import pywt
>>> wavelet = pywt.Wavelet('db1')
Expand Down Expand Up @@ -129,6 +130,7 @@ Custom discrete wavelets are also supported through the
**Example:**

.. try_examples::
:button_text: Try it in your browser!

>>> def format_array(arr):
... return "[%s]" % ", ".join(["%.14f" % x for x in arr])
Expand Down Expand Up @@ -172,6 +174,7 @@ Approximating wavelet and scaling functions - ``Wavelet.wavefun()``
**Example:**

.. try_examples::
:button_text: Try it in your browser!

>>> import pywt
>>> wavelet = pywt.Wavelet('db2')
Expand All @@ -187,6 +190,7 @@ Approximating wavelet and scaling functions - ``Wavelet.wavefun()``
**Example:**

.. try_examples::
:button_text: Try it in your browser!

>>> import pywt
>>> wavelet = pywt.Wavelet('bior3.5')
Expand Down Expand Up @@ -240,6 +244,7 @@ from plain Python lists of filter coefficients and a *filter bank-like* object.
**Example:**

.. try_examples::
:button_text: Try it in your browser!

>>> import pywt, math
>>> c = math.sqrt(2)/2
Expand Down Expand Up @@ -274,6 +279,7 @@ from plain Python lists of filter coefficients and a *filter bank-like* object.
**Example:**

.. try_examples::
:button_text: Try it in your browser!

>>> import pywt
>>> wavelet = pywt.ContinuousWavelet('gaus1')
Expand Down Expand Up @@ -329,6 +335,7 @@ from plain Python lists of filter coefficients and a *filter bank-like* object.
**Example:**

.. try_examples::
:button_text: Try it in your browser!

>>> import pywt
>>> wavelet = pywt.ContinuousWavelet('gaus1')
Expand Down Expand Up @@ -359,6 +366,7 @@ Approximating wavelet functions - ``ContinuousWavelet.wavefun()``
**Example:**

.. try_examples::
:button_text: Try it in your browser!

>>> import pywt
>>> wavelet = pywt.ContinuousWavelet('gaus1')
Expand All @@ -376,6 +384,7 @@ Approximating wavelet functions - ``ContinuousWavelet.wavefun()``
**Example:**

.. try_examples::
:button_text: Try it in your browser!

>>> import pywt
>>> wavelet = pywt.DiscreteContinuousWavelet('db1')
Expand Down

0 comments on commit 7977ff8

Please sign in to comment.