蟒蛇:python3.2 cvxopt:1.1.5 numpy:1.6.1
我读了http://abel.ee.ucla.edu/cvxopt/examples/tutorial/numpy.html
import cvxopt
import numpy as np
cvxopt.matrix(np.array([[7, 8, 9], [10, 11, 12]]))
我有
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: non-numeric element in list
通过np.array(cvxopt.matrix([[7, 8, 9], [10, 11, 12]]))
,我得到了
array([[b'\x07', b'\n'],
[b'\x08', b'\x0b'],
[b'\t', b'\x0c']],
dtype='|S8')