State-Frequency-Memory-stock-prediction icon indicating copy to clipboard operation
State-Frequency-Memory-stock-prediction copied to clipboard

running error

Open nickhuangxinyu opened this issue 6 years ago • 1 comments

when i run python test.py --step=1, i got the following errors:

Using TensorFlow backend.

Loading data... <type 'numpy.ndarray'> Traceback (most recent call last): File "test.py", line 35, in X_train, y_train, X_val, y_val, X_test, y_test, gt_test, max_data, min_data = build.load_data(data_file, step) File "/home/canl/nick/State-Frequency-Memory-stock-prediction/test/build.py", line 30, in load_data x_train = data[:,:train_split] TypeError: slice indices must be integers or None or have an index method

bc my pandas or numpy is wrong version?? Thanks

nickhuangxinyu avatar Dec 16 '18 07:12 nickhuangxinyu

when i run python test.py --step=1, i got the following errors:

Using TensorFlow backend.

Loading data... <type 'numpy.ndarray'> Traceback (most recent call last): File "test.py", line 35, in X_train, y_train, X_val, y_val, X_test, y_test, gt_test, max_data, min_data = build.load_data(data_file, step) File "/home/canl/nick/State-Frequency-Memory-stock-prediction/test/build.py", line 30, in load_data x_train = data[:,:train_split] TypeError: slice indices must be integers or None or have an index method

bc my pandas or numpy is wrong version?? Thanks

use int() instead of round(),because round function return float in python 2.7

ICDI0906 avatar May 15 '19 09:05 ICDI0906