Skip to content

Commit 4c4683a

Browse files
committed
Merge branch 'master' of github.com:florisvb/PyNumDiff into improve-fd
2 parents 2764aa1 + 2822a40 commit 4c4683a

3 files changed

Lines changed: 10 additions & 46 deletions

File tree

docs/make.bat

Lines changed: 0 additions & 35 deletions
This file was deleted.

docs/source/utils.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ utils
44
.. toctree::
55
:maxdepth: 1
66

7-
utils/_pi_cruise_control
87
utils/evaluate
98
utils/simulate
109
utils/utility

pynumdiff/utils/utility.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,16 @@ def hankel_matrix(x, num_delays, pad=False): # fixed delay step of 1
88
:param np.array[float] x: data
99
:param int num_delays: number of times to 1-step shift data
1010
:param bool pad: if True, return width is len(x), else width is len(x) - num_delays + 1
11-
:return: a Hankel Matrix m
12-
e.g. if x = [a, b, c, d, e] and num_delays = 3
13-
then with pad = False:
14-
m = [['a', 'b', 'c'],
15-
['b', 'c', 'd'],
16-
['c', 'd', 'e']]
17-
or pad = True:
18-
m = [['a', 'b', 'c', 'd', 'e'],
19-
['b', 'c', 'd', 'e', 0],
20-
['c', 'd', 'e', 0, 0]]
11+
12+
:return: a Hankel Matrix `m`. For example, if `x = [a, b, c, d, e]` and `num_delays = 3`:\n
13+
With `pad = False`::\n
14+
m = [[a, b, c],
15+
[b, c, d],
16+
[c, d, e]]\n
17+
With `pad = True`::\n
18+
m = [[a, b, c, d, e],
19+
[b, c, d, e, 0],
20+
[c, d, e, 0, 0]]
2121
"""
2222
m = x.copy()
2323
for d in range(1, num_delays):

0 commit comments

Comments
 (0)