TypeError for scalar division

10 views
Skip to first unread message

jah

unread,
Apr 14, 2015, 9:55:32 PM4/14/15
to cvx...@googlegroups.com
Hi, when I include a:

from __future__ import division

in my code, I am no longer able to divide matrices by scalars:

from __future__ import division
from cvxopt import matrix
x = matrix(np.array([[1,2.0],[3,5]]))
print x / 5

TypeError: unsupported operand type(s) for /: 'cvxopt.base.matrix' and 'int'
 
Reply all
Reply to author
Forward
0 new messages