From 0dd606c7f8f86f78e088dbe23814a808e4b8e0b0 Mon Sep 17 00:00:00 2001 From: Matze2 <12542802+Matze2@users.noreply.github.com> Date: Mon, 28 Oct 2024 01:27:01 +0100 Subject: [PATCH] Fix to support NumPy 2 `np.asfarray` was removed in the NumPy 2.0 release. Use `np.asarray` with a proper dtype instead. --- PVForecast/dwdforecast.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PVForecast/dwdforecast.py b/PVForecast/dwdforecast.py index fa69777..7b6dc13 100644 --- a/PVForecast/dwdforecast.py +++ b/PVForecast/dwdforecast.py @@ -206,7 +206,7 @@ def parseKML(self): valStr = valStrArray[i].text.replace('-', 'nan') valArr = valStr.split() valArr = np.array(valArr) - valArr = np.asfarray(valArr, float) + valArr = np.asarray(valArr, dtype=float) weatherData.update({ param : valArr }) self.DataTable = pd.DataFrame(weatherData, index=pd.DatetimeIndex(PeriodEnd)) self.DataTable.index.name = 'PeriodEnd' # Time is in UTC