Skip to content

Commit 151a140

Browse files
Solve test ubuntu issue (#528)
* Update neuralprophet_dev_setup * test wsl * add dtype to the np.array() inside _stride_lagged_features function
1 parent 61b57d6 commit 151a140

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

neuralprophet/time_dataset.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,8 @@ def _stride_time_features_for_forecasts(x):
175175
def _stride_lagged_features(df_col_name, feature_dims):
176176
# only for case where n_lags > 0
177177
series = df.loc[:, df_col_name].values
178-
return np.array([series[i + n_lags - feature_dims : i + n_lags] for i in range(n_samples)])
178+
## Added dtype=np.float64 to solve the problem with np.isnan for ubuntu test
179+
return np.array([series[i + n_lags - feature_dims : i + n_lags] for i in range(n_samples)], dtype=np.float64)
179180

180181
if n_lags > 0 and "y" in df.columns:
181182
inputs["lags"] = _stride_lagged_features(df_col_name="y_scaled", feature_dims=n_lags)

0 commit comments

Comments
 (0)