]>
gitweb.michael.orlitzky.com - dunshire.git/blob - matrices.py
1 from cvxopt
import matrix
, spmatrix
6 Append the column ``b`` to the right side of the matrix ``A``.
8 return matrix([A
.trans(),b
.trans()]).trans()
12 Append the row ``b`` to the bottom of the matrix ``A``.
18 Return the ``n``-by-``n`` identity matrix.
20 return spmatrix(1,range(n
),range(n
))
24 Return the Euclidean norm of the given vector.
26 return sqrt(sum([z
**2 for z
in x
]))