@@ -50,9 +50,9 @@ async def init_feature_extractor(
5050
5151def _calculate_avg_window (
5252 feature_extractor : PeriodicFeatureExtractor ,
53- window : NDArray [np .float_ ],
53+ window : NDArray [np .float64 ],
5454 window_size : int ,
55- ) -> NDArray [np .float_ ]:
55+ ) -> NDArray [np .float64 ]:
5656 """
5757 Reshapes the window and calculates the average.
5858
@@ -77,10 +77,10 @@ def _calculate_avg_window(
7777
7878def _calculate_avg_window_py (
7979 feature_extractor : PeriodicFeatureExtractor ,
80- window : NDArray [np .float_ ],
80+ window : NDArray [np .float64 ],
8181 window_size : int ,
8282 weights : list [float ] | None = None ,
83- ) -> NDArray [np .float_ ]:
83+ ) -> NDArray [np .float64 ]:
8484 """
8585 Plain python version of the average calculator.
8686
@@ -100,7 +100,7 @@ def _calculate_avg_window_py(
100100 """
101101
102102 def _num_windows (
103- window : NDArray [np .float_ ] | MovingWindow , window_size : int , period : int
103+ window : NDArray [np .float64 ] | MovingWindow , window_size : int , period : int
104104 ) -> int :
105105 """
106106 Get the number of windows that are fully contained in the MovingWindow.
@@ -118,7 +118,7 @@ def _num_windows(
118118 The number of windows that are fully contained in the MovingWindow.
119119 """
120120
121- def length (window : NDArray [np .float_ ] | MovingWindow ) -> int :
121+ def length (window : NDArray [np .float64 ] | MovingWindow ) -> int :
122122 return (
123123 window .count_valid ()
124124 if isinstance (window , MovingWindow )
@@ -159,14 +159,14 @@ def length(window: NDArray[np.float_] | MovingWindow) -> int:
159159
160160
161161def run_benchmark (
162- array : NDArray [np .float_ ],
162+ array : NDArray [np .float64 ],
163163 window_size : int ,
164164 feature_extractor : PeriodicFeatureExtractor ,
165165) -> None :
166166 """Run the benchmark for the given ndarray and window size."""
167167
168168 def run_avg_np (
169- array : NDArray [np .float_ ],
169+ array : NDArray [np .float64 ],
170170 window_size : int ,
171171 feature_extractor : PeriodicFeatureExtractor ,
172172 ) -> None :
@@ -183,7 +183,7 @@ def run_avg_np(
183183 _calculate_avg_window (feature_extractor , array , window_size )
184184
185185 def run_avg_py (
186- array : NDArray [np .float_ ],
186+ array : NDArray [np .float64 ],
187187 window_size : int ,
188188 feature_extractor : PeriodicFeatureExtractor ,
189189 ) -> None :
0 commit comments