Skip to content

Commit 709bf4c

Browse files
authored
Fix docstrings to avoid sphinx warnings [ci skip][skip ci] (#516)
Fix rendering of lists in the swt docstrings
1 parent d872ef6 commit 709bf4c

File tree

2 files changed

+25
-19
lines changed

2 files changed

+25
-19
lines changed

pywt/_cwt.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ def cwt(data, scales, wavelet, sampling_period=1., method='conv', axis=-1):
6262
- ``fft`` uses frequency domain convolution.
6363
- ``auto`` uses automatic selection based on an estimate of the
6464
computational complexity at each scale.
65+
6566
The ``conv`` method complexity is ``O(len(scale) * len(data))``.
6667
The ``fft`` method is ``O(N * log2(N))`` with
6768
``N = len(scale) + len(data) - 1``. It is well suited for large size

pywt/_swt.py

Lines changed: 24 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -86,16 +86,17 @@ def swt(data, wavelet, level=None, start_level=0, axis=-1,
8686
at cost of redundancy in the transform (the size of the output coefficients
8787
is larger than the input).
8888
89-
When the following three conditions are true::
89+
When the following three conditions are true:
9090
91-
1.) The wavelet is orthogonal
92-
2.) ``swt`` is called with ``norm=True``
93-
3.) ``swt`` is called with ``trim_approx=True``
91+
1. The wavelet is orthogonal
92+
2. ``swt`` is called with ``norm=True``
93+
3. ``swt`` is called with ``trim_approx=True``
9494
9595
the transform has the following additional properties that may be
9696
desirable in applications:
97-
1.) energy is conserved
98-
2.) variance is partitioned across scales
97+
98+
1. energy is conserved
99+
2. variance is partitioned across scales
99100
100101
When used with ``norm=True``, this transform is closely related to the
101102
multiple-overlap DWT (MODWT) as popularized for time-series analysis,
@@ -106,7 +107,7 @@ def swt(data, wavelet, level=None, start_level=0, axis=-1,
106107
References
107108
----------
108109
.. [1] DB Percival and AT Walden. Wavelet Methods for Time Series Analysis.
109-
Cambridge University Press, 2000.
110+
Cambridge University Press, 2000.
110111
"""
111112

112113
if not _have_c99_complex and np.iscomplexobj(data):
@@ -328,16 +329,18 @@ def swt2(data, wavelet, level, start_level=0, axes=(-2, -1),
328329
at cost of redundancy in the transform (the size of the output coefficients
329330
is larger than the input).
330331
331-
When the following three conditions are true::
332+
When the following three conditions are true:
332333
333-
1.) The wavelet is orthogonal
334-
2.) ``swt2`` is called with ``norm=True``
335-
3.) ``swt2`` is called with ``trim_approx=True``
334+
1. The wavelet is orthogonal
335+
2. ``swt2`` is called with ``norm=True``
336+
3. ``swt2`` is called with ``trim_approx=True``
336337
337338
the transform has the following additional properties that may be
338339
desirable in applications:
339-
1.) energy is conserved
340-
2.) variance is partitioned across scales
340+
341+
1. energy is conserved
342+
2. variance is partitioned across scales
343+
341344
"""
342345
axes = tuple(axes)
343346
data = np.asarray(data)
@@ -562,16 +565,18 @@ def swtn(data, wavelet, level, start_level=0, axes=None, trim_approx=False,
562565
at cost of redundancy in the transform (the size of the output coefficients
563566
is larger than the input).
564567
565-
When the following three conditions are true::
568+
When the following three conditions are true:
566569
567-
1.) The wavelet is orthogonal
568-
2.) ``swtn`` is called with ``norm=True``
569-
3.) ``swtn`` is called with ``trim_approx=True``
570+
1. The wavelet is orthogonal
571+
2. ``swtn`` is called with ``norm=True``
572+
3. ``swtn`` is called with ``trim_approx=True``
570573
571574
the transform has the following additional properties that may be
572575
desirable in applications:
573-
1.) energy is conserved
574-
2.) variance is partitioned across scales
576+
577+
1. energy is conserved
578+
2. variance is partitioned across scales
579+
575580
"""
576581
data = np.asarray(data)
577582
if not _have_c99_complex and np.iscomplexobj(data):

0 commit comments

Comments
 (0)