Oct-04-2023, 06:06 PM
Hi,
i have the problem with the following code that it takes extremely long time to run completely under Python 3.9 - 3.11. but under 3.6 - 3.8 it works without big problem. Can someone explain me why this is and how to make it faster on Python 3.9 and higher. The time difference is from few seconds (by 3.8) to about 1 hour (by 3.11).
I have tested it under windows 11 and Ubuntu 22.04 with the same results.
i have the problem with the following code that it takes extremely long time to run completely under Python 3.9 - 3.11. but under 3.6 - 3.8 it works without big problem. Can someone explain me why this is and how to make it faster on Python 3.9 and higher. The time difference is from few seconds (by 3.8) to about 1 hour (by 3.11).
I have tested it under windows 11 and Ubuntu 22.04 with the same results.
import pandas as pd import numpy as np fileName = "Data" inputRange = 20 df = pd.read_csv(fileName + ".csv", delimiter=";") x_data = df[["Close","High","Low","Volumen"]] y_data = df["Signal"] x_train = [] for i in range(0,len(x_data)-inputRange): x_train.append(x_data[(i+1):(i+inputRange+1)])