summaryrefslogtreecommitdiff
path: root/src/python/test/test_time_delay.py
diff options
context:
space:
mode:
authormtakenouchi <m.takenouchi@jp.fujitsu.com>2020-02-14 18:24:18 +0900
committermtakenouchi <m.takenouchi@jp.fujitsu.com>2020-02-14 18:24:18 +0900
commitf58a4120b70487aede3cb4e81fbb15171e34fa37 (patch)
tree6fb92acf11b07023f023961cc9d57a591b54c877 /src/python/test/test_time_delay.py
parent2253fd03bb49aea455309f6d633a6edeb2362d79 (diff)
Update test_time_delay.py
Diffstat (limited to 'src/python/test/test_time_delay.py')
-rwxr-xr-xsrc/python/test/test_time_delay.py36
1 files changed, 18 insertions, 18 deletions
diff --git a/src/python/test/test_time_delay.py b/src/python/test/test_time_delay.py
index d2ffbf40..1cdf56f9 100755
--- a/src/python/test/test_time_delay.py
+++ b/src/python/test/test_time_delay.py
@@ -6,30 +6,30 @@ def test_normal():
# Normal case.
prep = TimeDelayEmbedding()
attractor = prep(ts)
- assert (attractor[0] == np.array[1, 2, 3])
- assert (attractor[1] == np.array[2, 3, 4])
- assert (attractor[2] == np.array[3, 4, 5])
- assert (attractor[3] == np.array[4, 5, 6])
- assert (attractor[4] == np.array[5, 6, 7])
- assert (attractor[5] == np.array[6, 7, 8])
- assert (attractor[6] == np.array[7, 8, 9])
- assert (attractor[7] == np.array[8, 9, 10])
+ assert (attractor[0] == np.array([1, 2, 3]))
+ assert (attractor[1] == np.array([2, 3, 4]))
+ assert (attractor[2] == np.array([3, 4, 5]))
+ assert (attractor[3] == np.array([4, 5, 6]))
+ assert (attractor[4] == np.array([5, 6, 7]))
+ assert (attractor[5] == np.array([6, 7, 8]))
+ assert (attractor[6] == np.array([7, 8, 9]))
+ assert (attractor[7] == np.array([8, 9, 10]))
# Delay = 3
prep = TimeDelayEmbedding(delay=3)
attractor = prep(ts)
- assert (attractor[0] == np.array[1, 4, 7])
- assert (attractor[1] == np.array[2, 5, 8])
- assert (attractor[2] == np.array[3, 6, 9])
- assert (attractor[3] == np.array[4, 7, 10])
+ assert (attractor[0] == np.array([1, 4, 7]))
+ assert (attractor[1] == np.array([2, 5, 8]))
+ assert (attractor[2] == np.array([3, 6, 9]))
+ assert (attractor[3] == np.array([4, 7, 10]))
# Skip = 3
prep = TimeDelayEmbedding(skip=3)
attractor = prep(ts)
- assert (attractor[0] == np.array[1, 2, 3])
- assert (attractor[1] == np.array[4, 5, 6])
- assert (attractor[2] == np.array[7, 8, 9])
+ assert (attractor[0] == np.array([1, 2, 3]))
+ assert (attractor[1] == np.array([4, 5, 6]))
+ assert (attractor[2] == np.array([7, 8, 9]))
# Delay = 2 / Skip = 2
prep = TimeDelayEmbedding(delay=2, skip=2)
attractor = prep(ts)
- assert (attractor[0] == np.array[1, 3, 5])
- assert (attractor[1] == np.array[3, 5, 7])
- assert (attractor[2] == np.array[5, 7, 9])
+ assert (attractor[0] == np.array([1, 3, 5]))
+ assert (attractor[1] == np.array([3, 5, 7]))
+ assert (attractor[2] == np.array([5, 7, 9]))