z331565360/State-Frequency-Memory-stock-prediction

running error

nickhuangxinyu opened this issue · 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

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