Skip to content

Commit 3258a60

Browse files
committed
ugh, didn't add all the files last commit
1 parent 705319e commit 3258a60

2 files changed

Lines changed: 10 additions & 45 deletions

File tree

docs/make.bat

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

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)