Skip to content

Commit bf4e482

Browse files
committed
DOC: consistently link Modes documentation from docstrings
1 parent 5dcb5fb commit bf4e482

File tree

3 files changed

+23
-26
lines changed

3 files changed

+23
-26
lines changed

pywt/_dwt.py

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ def dwt_coeff_len(data_len, filter_len, mode):
9393
filter_len : int
9494
Filter length.
9595
mode : str, optional (default: 'symmetric')
96-
Signal extension mode, see Modes
96+
Signal extension mode, see :ref:`Modes <ref-modes>`.
9797
9898
Returns
9999
-------
@@ -130,12 +130,11 @@ def dwt(data, wavelet, mode='symmetric', axis=-1):
130130
wavelet : Wavelet object or name
131131
Wavelet to use
132132
mode : str, optional
133-
Signal extension mode, see Modes
133+
Signal extension mode, see :ref:`Modes <ref-modes>`.
134134
axis: int, optional
135135
Axis over which to compute the DWT. If not given, the
136136
last axis is used.
137137
138-
139138
Returns
140139
-------
141140
(cA, cD) : tuple
@@ -206,12 +205,11 @@ def idwt(cA, cD, wavelet, mode='symmetric', axis=-1):
206205
wavelet : Wavelet object or name
207206
Wavelet to use
208207
mode : str, optional (default: 'symmetric')
209-
Signal extension mode, see Modes
208+
Signal extension mode, see :ref:`Modes <ref-modes>`.
210209
axis: int, optional
211210
Axis over which to compute the inverse DWT. If not given, the
212211
last axis is used.
213212
214-
215213
Returns
216214
-------
217215
rec: array_like
@@ -316,7 +314,7 @@ def downcoef(part, data, wavelet, mode='symmetric', level=1):
316314
wavelet : Wavelet object or name
317315
Wavelet to use
318316
mode : str, optional
319-
Signal extension mode, see `Modes`. Default is 'symmetric'.
317+
Signal extension mode, see :ref:`Modes <ref-modes>`.
320318
level : int, optional
321319
Decomposition level. Default is 1.
322320
@@ -406,7 +404,7 @@ def upcoef(part, coeffs, wavelet, level=1, take=0):
406404
def pad(x, pad_widths, mode):
407405
"""Extend a 1D signal using a given boundary mode.
408406
409-
This function operates like `numpy.pad` but supports all signal extension
407+
This function operates like ``numpy.pad`` but supports all signal extension
410408
modes that can be used by PyWavelets discrete wavelet transforms.
411409
412410
Parameters
@@ -420,7 +418,7 @@ def pad(x, pad_widths, mode):
420418
axis. (pad,) or int is a shortcut for before = after = pad width for
421419
all axes.
422420
mode : str, optional
423-
Signal extension mode, see Modes.
421+
Signal extension mode, see :ref:`Modes <ref-modes>`.
424422
425423
Returns
426424
-------
@@ -430,9 +428,9 @@ def pad(x, pad_widths, mode):
430428
431429
Notes
432430
-----
433-
The performance of padding in dimensions > 1 will be substantially slower
434-
for modes `smooth` and `antisymmetric` as these modes are not supported in
435-
an efficient manner by the underlying `numpy.pad` function.
431+
The performance of padding in dimensions > 1 may be substantially slower
432+
for modes ``smooth`` and ``antisymmetric`` as these modes are not supported
433+
efficiently by the underlying ``numpy.pad`` function.
436434
"""
437435
x = np.asanyarray(x)
438436

pywt/_multidim.py

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ def dwt2(data, wavelet, mode='symmetric', axes=(-2, -1)):
3333
Wavelet to use. This can also be a tuple containing a wavelet to
3434
apply along each axis in ``axes``.
3535
mode : str or 2-tuple of strings, optional
36-
Signal extension mode, see Modes (default: 'symmetric'). This can
37-
also be a tuple of modes specifying the mode to use on each axis in
36+
Signal extension mode, see :ref:`Modes <ref-modes>`. This can also
37+
be a tuple of modes specifying the mode to use on each axis in
3838
``axes``.
3939
axes : 2-tuple of ints, optional
4040
Axes over which to compute the DWT. Repeated elements mean the DWT will
@@ -90,9 +90,8 @@ def idwt2(coeffs, wavelet, mode='symmetric', axes=(-2, -1)):
9090
Wavelet to use. This can also be a tuple containing a wavelet to
9191
apply along each axis in ``axes``.
9292
mode : str or 2-tuple of strings, optional
93-
Signal extension mode, see Modes (default: 'symmetric'). This can
94-
also be a tuple of modes specifying the mode to use on each axis in
95-
``axes``.
93+
Signal extension mode, see :ref:`Modes <ref-modes>`. This can also be
94+
a tuple of modes specifying the mode to use on each axis in ``axes``.
9695
axes : 2-tuple of ints, optional
9796
Axes over which to compute the IDWT. Repeated elements mean the IDWT
9897
will be performed multiple times along these axes.
@@ -131,7 +130,7 @@ def dwtn(data, wavelet, mode='symmetric', axes=None):
131130
apply along each axis in ``axes``.
132131
mode : str or tuple of string, optional
133132
Signal extension mode used in the decomposition,
134-
see Modes (default: 'symmetric'). This can also be a tuple of modes
133+
see :ref:`Modes <ref-modes>`. This can also be a tuple of modes
135134
specifying the mode to use on each axis in ``axes``.
136135
axes : sequence of ints, optional
137136
Axes over which to compute the DWT. Repeated elements mean the DWT will
@@ -233,7 +232,7 @@ def idwtn(coeffs, wavelet, mode='symmetric', axes=None):
233232
apply along each axis in ``axes``.
234233
mode : str or list of string, optional
235234
Signal extension mode used in the decomposition,
236-
see Modes (default: 'symmetric'). This can also be a tuple of modes
235+
see :ref:`Modes <ref-modes>`. This can also be a tuple of modes
237236
specifying the mode to use on each axis in ``axes``.
238237
axes : sequence of ints, optional
239238
Axes over which to compute the IDWT. Repeated elements mean the IDWT

pywt/_multilevel.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ def wavedec(data, wavelet, mode='symmetric', level=None, axis=-1):
5757
wavelet : Wavelet object or name string
5858
Wavelet to use
5959
mode : str, optional
60-
Signal extension mode, see `Modes` (default: 'symmetric')
60+
Signal extension mode, see :ref:`Modes <ref-modes>`.
6161
level : int, optional
6262
Decomposition level (must be >= 0). If level is None (default) then it
6363
will be calculated using the `dwt_max_level` function.
@@ -119,7 +119,7 @@ def waverec(coeffs, wavelet, mode='symmetric', axis=-1):
119119
wavelet : Wavelet object or name string
120120
Wavelet to use
121121
mode : str, optional
122-
Signal extension mode, see `Modes` (default: 'symmetric')
122+
Signal extension mode, see :ref:`Modes <ref-modes>`.
123123
axis: int, optional
124124
Axis over which to compute the inverse DWT. If not given, the
125125
last axis is used.
@@ -185,7 +185,7 @@ def wavedec2(data, wavelet, mode='symmetric', level=None, axes=(-2, -1)):
185185
Wavelet to use. This can also be a tuple containing a wavelet to
186186
apply along each axis in `axes`.
187187
mode : str or 2-tuple of str, optional
188-
Signal extension mode, see `Modes` (default: 'symmetric'). This can
188+
Signal extension mode, see :ref:`Modes <ref-modes>`. This can
189189
also be a tuple containing a mode to apply along each axis in `axes`.
190190
level : int, optional
191191
Decomposition level (must be >= 0). If level is None (default) then it
@@ -259,7 +259,7 @@ def waverec2(coeffs, wavelet, mode='symmetric', axes=(-2, -1)):
259259
Wavelet to use. This can also be a tuple containing a wavelet to
260260
apply along each axis in `axes`.
261261
mode : str or 2-tuple of str, optional
262-
Signal extension mode, see `Modes` (default: 'symmetric'). This can
262+
Signal extension mode, see :ref:`Modes <ref-modes>`. This can
263263
also be a tuple containing a mode to apply along each axis in `axes`.
264264
axes : 2-tuple of ints, optional
265265
Axes over which to compute the IDWT. Repeated elements are not allowed.
@@ -359,7 +359,7 @@ def wavedecn(data, wavelet, mode='symmetric', level=None, axes=None):
359359
Wavelet to use. This can also be a tuple containing a wavelet to
360360
apply along each axis in `axes`.
361361
mode : str or tuple of str, optional
362-
Signal extension mode, see `Modes` (default: 'symmetric'). This can
362+
Signal extension mode, see :ref:`Modes <ref-modes>`. This can
363363
also be a tuple containing a mode to apply along each axis in `axes`.
364364
level : int, optional
365365
Decomposition level (must be >= 0). If level is None (default) then it
@@ -458,7 +458,7 @@ def waverecn(coeffs, wavelet, mode='symmetric', axes=None):
458458
Wavelet to use. This can also be a tuple containing a wavelet to
459459
apply along each axis in `axes`.
460460
mode : str or tuple of str, optional
461-
Signal extension mode, see `Modes` (default: 'symmetric'). This can
461+
Signal extension mode, see :ref:`Modes <ref-modes>`. This can
462462
also be a tuple containing a mode to apply along each axis in `axes`.
463463
axes : sequence of ints, optional
464464
Axes over which to compute the IDWT. Axes may not be repeated.
@@ -869,7 +869,7 @@ def wavedecn_shapes(shape, wavelet, mode='symmetric', level=None, axes=None):
869869
Wavelet to use. This can also be a tuple containing a wavelet to
870870
apply along each axis in `axes`.
871871
mode : str or tuple of str, optional
872-
Signal extension mode, see Modes (default: 'symmetric'). This can
872+
Signal extension mode, see :ref:`Modes <ref-modes>`. This can
873873
also be a tuple containing a mode to apply along each axis in `axes`.
874874
level : int, optional
875875
Decomposition level (must be >= 0). If level is None (default) then it
@@ -1362,7 +1362,7 @@ def fswavedecn(data, wavelet, mode='symmetric', levels=None, axes=None):
13621362
Wavelet to use. This can also be a tuple containing a wavelet to
13631363
apply along each axis in ``axes``.
13641364
mode : str or tuple of str, optional
1365-
Signal extension mode, see `Modes` (default: 'symmetric'). This can
1365+
Signal extension mode, see :ref:`Modes <ref-modes>`. This can
13661366
also be a tuple containing a mode to apply along each axis in ``axes``.
13671367
levels : int or sequence of ints, optional
13681368
Decomposition levels along each axis (must be >= 0). If an integer is

0 commit comments

Comments
 (0)