Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Sep 21, 2023
1 parent f74a75f commit 288f087
Showing 1 changed file with 26 additions and 18 deletions.
44 changes: 26 additions & 18 deletions tests/gaze/transforms/smooth_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@
'padding': None,
},
pl.Series('position', [[0., 0.], [1., 1.], [0., 0.]], pl.List(pl.Float64)),
pl.Series('position', [[None, None], [1/2, 1/2], [1/2, 1/2]], pl.List(pl.Float64)),
pl.Series('position', [[None, None], [1 / 2, 1 / 2],
[1 / 2, 1 / 2]], pl.List(pl.Float64)),
id='moving_average_window_length_2_no_padding',
),
pytest.param(
Expand All @@ -59,7 +60,7 @@
'padding': 0.0,
},
pl.Series('position', [[0., 0.], [1., 1.], [0., 0.]], pl.List(pl.Float64)),
pl.Series('position', [[0., 0.], [1/2, 1/2], [1/2, 1/2]], pl.List(pl.Float64)),
pl.Series('position', [[0., 0.], [1 / 2, 1 / 2], [1 / 2, 1 / 2]], pl.List(pl.Float64)),
id='moving_average_window_length_2_constant_padding_0',
),
pytest.param(
Expand All @@ -71,7 +72,7 @@
},
pl.Series('position', [[0., 0.], [1., 1.], [0., 0.]], pl.List(pl.Float64)),
pl.Series(
'position', [[1 / 2, 1 / 2], [1 / 2, 1 / 2], [1 / 2, 1 / 2]], pl.List(pl.Float64)
'position', [[1 / 2, 1 / 2], [1 / 2, 1 / 2], [1 / 2, 1 / 2]], pl.List(pl.Float64),
),
id='moving_average_window_length_2_constant_padding_1',
),
Expand All @@ -83,7 +84,7 @@
'padding': 'nearest',
},
pl.Series('position', [[0., 0.], [1., 1.], [0., 0.]], pl.List(pl.Float64)),
pl.Series('position', [[0., 0.], [1/2, 1/2], [1/2, 1/2]], pl.List(pl.Float64)),
pl.Series('position', [[0., 0.], [1 / 2, 1 / 2], [1 / 2, 1 / 2]], pl.List(pl.Float64)),
id='moving_average_window_length_2_nearest_padding',
),
pytest.param(
Expand All @@ -94,7 +95,8 @@
'padding': 'mirror',
},
pl.Series('position', [[0., 0.], [1., 1.], [0., 0.]], pl.List(pl.Float64)),
pl.Series('position', [[1 / 2, 1/2], [1/2, 1/2], [1/2, 1/2]], pl.List(pl.Float64)),
pl.Series('position', [[1 / 2, 1 / 2], [1 / 2, 1 / 2],
[1 / 2, 1 / 2]], pl.List(pl.Float64)),
id='moving_average_window_length_2_mirror_padding',
),
pytest.param(
Expand All @@ -105,7 +107,8 @@
'padding': None,
},
pl.Series('position', [[0., 0.], [1., 1.], [0., 0.]], pl.List(pl.Float64)),
pl.Series('position', [[None, None], [1/3, 1/3], [None, None]], pl.List(pl.Float64)),
pl.Series('position', [[None, None], [1 / 3, 1 / 3],
[None, None]], pl.List(pl.Float64)),
id='moving_average_window_length_3_no_padding',
),
pytest.param(
Expand All @@ -116,7 +119,8 @@
'padding': 0.0,
},
pl.Series('position', [[0., 0.], [1., 1.], [0., 0.]], pl.List(pl.Float64)),
pl.Series('position', [[1/3, 1/3], [1/3, 1/3], [1/3, 1/3]], pl.List(pl.Float64)),
pl.Series('position', [[1 / 3, 1 / 3], [1 / 3, 1 / 3],
[1 / 3, 1 / 3]], pl.List(pl.Float64)),
id='moving_average_window_length_3_constant_padding_0',
),
pytest.param(
Expand All @@ -128,7 +132,7 @@
},
pl.Series('position', [[0., 0.], [1., 1.], [0., 0.]], pl.List(pl.Float64)),
pl.Series(
'position', [[2 / 3, 2 / 3], [1 / 3, 1 / 3], [2 / 3, 2 / 3]], pl.List(pl.Float64)
'position', [[2 / 3, 2 / 3], [1 / 3, 1 / 3], [2 / 3, 2 / 3]], pl.List(pl.Float64),
),
id='moving_average_window_length_3_constant_padding_1',
),
Expand All @@ -140,7 +144,8 @@
'padding': 'nearest',
},
pl.Series('position', [[0., 0.], [1., 1.], [0., 0.]], pl.List(pl.Float64)),
pl.Series('position', [[1/3, 1/3], [1/3, 1/3], [1/3, 1/3]], pl.List(pl.Float64)),
pl.Series('position', [[1 / 3, 1 / 3], [1 / 3, 1 / 3],
[1 / 3, 1 / 3]], pl.List(pl.Float64)),
id='moving_average_window_length_3_nearest_padding',
),
pytest.param(
Expand All @@ -151,7 +156,8 @@
'padding': 'mirror',
},
pl.Series('position', [[0., 0.], [1., 1.], [0., 0.]], pl.List(pl.Float64)),
pl.Series('position', [[2/3, 2/3], [1/3, 1/3], [2/3, 2/3]], pl.List(pl.Float64)),
pl.Series('position', [[2 / 3, 2 / 3], [1 / 3, 1 / 3],
[2 / 3, 2 / 3]], pl.List(pl.Float64)),
id='moving_average_window_length_3_mirror_padding',
),
# Method: exponential_moving_average
Expand All @@ -174,7 +180,8 @@
'padding': None,
},
pl.Series('position', [[0., 0.], [1., 1.], [0., 0.]], pl.List(pl.Float64)),
pl.Series('position', [[None, None], [2/3, 2/3], [2/9, 2/9]], pl.List(pl.Float64)),
pl.Series('position', [[None, None], [2 / 3, 2 / 3],
[2 / 9, 2 / 9]], pl.List(pl.Float64)),
id='exponential_moving_average_window_length_2_no_padding',
),
pytest.param(
Expand All @@ -185,7 +192,7 @@
'padding': 0.0,
},
pl.Series('position', [[0., 0.], [1., 1.], [0., 0.]], pl.List(pl.Float64)),
pl.Series('position', [[0., 0.], [2/3, 2/3], [2/9, 2/9]], pl.List(pl.Float64)),
pl.Series('position', [[0., 0.], [2 / 3, 2 / 3], [2 / 9, 2 / 9]], pl.List(pl.Float64)),
id='exponential_moving_average_window_length_2_constant_padding_0',
),
pytest.param(
Expand All @@ -197,7 +204,7 @@
},
pl.Series('position', [[0., 0.], [1., 1.], [0., 0.]], pl.List(pl.Float64)),
pl.Series(
'position', [[1 / 3, 1 / 3], [7 / 9, 7 / 9], [7 / 27, 7 / 27]], pl.List(pl.Float64)
'position', [[1 / 3, 1 / 3], [7 / 9, 7 / 9], [7 / 27, 7 / 27]], pl.List(pl.Float64),
),
id='exponential_moving_average_window_length_2_constant_padding_1',
),
Expand All @@ -209,7 +216,7 @@
'padding': 'nearest',
},
pl.Series('position', [[0., 0.], [1., 1.], [0., 0.]], pl.List(pl.Float64)),
pl.Series('position', [[0., 0.], [2/3, 2/3], [2/9, 2/9]], pl.List(pl.Float64)),
pl.Series('position', [[0., 0.], [2 / 3, 2 / 3], [2 / 9, 2 / 9]], pl.List(pl.Float64)),
id='exponential_moving_average_window_length_2_nearest_padding',
),
pytest.param(
Expand All @@ -221,7 +228,7 @@
},
pl.Series('position', [[0., 0.], [1., 1.], [0., 0.]], pl.List(pl.Float64)),
pl.Series(
'position', [[1 / 3, 1 / 3], [7 / 9, 7 / 9], [7 / 27, 7 / 27]], pl.List(pl.Float64)
'position', [[1 / 3, 1 / 3], [7 / 9, 7 / 9], [7 / 27, 7 / 27]], pl.List(pl.Float64),
),
id='exponential_moving_average_window_length_2_mirror_padding',
),
Expand Down Expand Up @@ -278,7 +285,7 @@
},
pl.Series('position', [[0., 0.], [1., 1.], [0., 0.]], pl.List(pl.Float64)),
pl.Series(
'position', [[0.25, 0.25], [0.625, 0.625], [0.3125, 0.3125]], pl.List(pl.Float64)
'position', [[0.25, 0.25], [0.625, 0.625], [0.3125, 0.3125]], pl.List(pl.Float64),
),
id='exponential_moving_average_window_length_3_mirror_padding',
),
Expand All @@ -302,7 +309,8 @@
'degree': 1,
},
pl.Series('position', [[0., 0.], [1., 1.], [0., 0.]], pl.List(pl.Float64)),
pl.Series('position', [[1/3, 1/3], [1/3, 1/3], [1/3, 1/3]], pl.List(pl.Float64)),
pl.Series('position', [[1 / 3, 1 / 3], [1 / 3, 1 / 3],
[1 / 3, 1 / 3]], pl.List(pl.Float64)),
id='savitzky_golay_window_length_3_degree_1_returns_mean_of_window',
),
pytest.param(
Expand All @@ -313,7 +321,7 @@
'degree': 2,
},
pl.Series('position', [[0., 0.], [1., 1.], [0., 0.]], pl.List(pl.Float64)),
pl.Series('position', [[0.,0.], [1., 1.], [0., 0.]], pl.List(pl.Float64)),
pl.Series('position', [[0., 0.], [1., 1.], [0., 0.]], pl.List(pl.Float64)),
id='savitzky_golay_window_length_3_degree_2_returns',
),
],
Expand Down

0 comments on commit 288f087

Please sign in to comment.