summaryrefslogtreecommitdiff
path: root/src/python/test/test_time_delay.py
diff options
context:
space:
mode:
authormtakenouchi <m.takenouchi@jp.fujitsu.com>2020-02-14 17:52:07 +0900
committermtakenouchi <m.takenouchi@jp.fujitsu.com>2020-02-14 17:52:07 +0900
commit2253fd03bb49aea455309f6d633a6edeb2362d79 (patch)
treea5796330aecef93b2cd6fa10f6b152fe2d0264c0 /src/python/test/test_time_delay.py
parent9cc9e1cf3cd9ea42908324d410ef68fa12e8e832 (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 2ee0c1fb..d2ffbf40 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] == [1, 2, 3])
- assert (attractor[1] == [2, 3, 4])
- assert (attractor[2] == [3, 4, 5])
- assert (attractor[3] == [4, 5, 6])
- assert (attractor[4] == [5, 6, 7])
- assert (attractor[5] == [6, 7, 8])
- assert (attractor[6] == [7, 8, 9])
- assert (attractor[7] == [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] == [1, 4, 7])
- assert (attractor[1] == [2, 5, 8])
- assert (attractor[2] == [3, 6, 9])
- assert (attractor[3] == [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] == [1, 2, 3])
- assert (attractor[1] == [4, 5, 6])
- assert (attractor[2] == [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] == [1, 3, 5])
- assert (attractor[1] == [3, 5, 7])
- assert (attractor[2] == [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])