fix deprecated pandas as_matrix usage

Replace the deprecated DataFrame.as_matrix() API with DataFrame.to_numpy() to restore compatibility with modern pandas versions.
pull/1035/head
Navin Prasath 3 weeks ago committed by GitHub
parent d0d0ea2b2d
commit ca6a0db071
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -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:

Loading…
Cancel
Save