针对你遇到的错误 "expected np.ndarray (got dataframe)",这个问题通常发生在将Pandas DataFrame错误地传递给了期望接收NumPy ndarray作为输入的函数或方法时。以下是详细的解决步骤: 理解错误信息: 错误信息表明某个函数或方法期望得到一个NumPy ndarray类型的对象,但实际上得到的是一个Pandas DataFrame。 识别导致错误...
That's not how inputs is intended to be used -- it's either a dict of columns to numpy.ndarray or pandas.Series, or it's a pandas.DataFrame with columns that match the expected input names (e.g., "open", "close", "volume", etc.). Author AlexBThomsen commented Jan 4, 2019 ...
in _window_slicing_sequence(self, X, window, shape_1X, y, stride) 264 ind_1X = np.arange(np.prod(shape_1X)) 265 inds_to_take = [ind_1X[i:i+window] for i in iter_array] --> 266 sliced_sqce = np.take(X, inds_to_take, axis=1).reshape(-1, window) 267 268 if y is...