From ca6a0db071cb500aa154a5f1ebfe1a4ca54888fc Mon Sep 17 00:00:00 2001 From: Navin Prasath Date: Sat, 12 Sep 2026 21:32:16 +0530 Subject: [PATCH] fix deprecated pandas as_matrix usage Replace the deprecated DataFrame.as_matrix() API with DataFrame.to_numpy() to restore compatibility with modern pandas versions. --- 7-TimeSeries/common/utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/7-TimeSeries/common/utils.py b/7-TimeSeries/common/utils.py index 4ab7623fe..801839c23 100644 --- a/7-TimeSeries/common/utils.py +++ b/7-TimeSeries/common/utils.py @@ -122,13 +122,13 @@ class TimeSeriesTensor(UserDict): inputs = {} y = dataframe['target'] - y = y.as_matrix() + y = y.to_numpy() inputs['target'] = y for name, structure in self.tensor_structure.items(): rng = structure[0] cols = structure[1] - tensor = dataframe[name][cols].as_matrix() + tensor = dataframe[name][cols].to_numpy() if rng is None: tensor = tensor.reshape(tensor.shape[0], len(cols)) else: