python array 类型 转换为 list 类型


import numpy as np
>>> np.array([[1,2,3],[4,5,6]]).tolist()
[[1, 2, 3], [4, 5, 6]]

自己代码:

matpath = "E:\\project\\deep learning\\RNN\\eeg rnn\\theano code\\keras-master\\examples\\wangFeature"

data = sio.loadmat(matpath)

Xx_train = data['x_train']

Xx_test = data['x_test']

Yy_train = data['Y_train']

Yy_test = data['Y_test']

X_train= []

X_test= []

y_train= []

y_test= []

X_train= Xx_train.tolist()

X_test= Xx_test.tolist()

y_train= Yy_train.tolist()

y_test= Yy_test.tolist()

阅读更多
想对作者说点什么? 我来说一句

没有更多推荐了,返回首页

不良信息举报

python array 类型 转换为 list 类型

最多只允许输入30个字

加入CSDN,享受更精准的内容推荐,与500万程序员共同成长!
关闭
关闭