From 1b555ba46250e63fd71653d10ba53eb972e213de Mon Sep 17 00:00:00 2001 From: robcaulk Date: Tue, 19 Jul 2022 17:28:38 +0200 Subject: [PATCH] remove unnecessary definition of np array --- freqtrade/freqai/data_kitchen.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/freqtrade/freqai/data_kitchen.py b/freqtrade/freqai/data_kitchen.py index 74d763e1b..8050b8b3b 100644 --- a/freqtrade/freqai/data_kitchen.py +++ b/freqtrade/freqai/data_kitchen.py @@ -676,9 +676,8 @@ class FreqaiDataKitchen: training than older data. """ wfactor = self.config["freqai"]["feature_parameters"]["weight_factor"] - weights = np.zeros(num_weights) - weights[1:] = np.exp( - - np.arange(1, len(weights)) / (wfactor * num_weights))[::-1] + weights = np.exp( + - np.arange(num_weights) / (wfactor * num_weights))[::-1] return weights def append_predictions(self, predictions, do_predict, len_dataframe):