2.6 Other Matrix Functions

The following functions of dense matrices can be imported from cvxopt.base.
sqrt( x)
The elementwise square root of x. The result is returned as a real matrix if x is an integer or real matrix and as a complex matrix if x is a complex matrix. Raises an exception when x is an integer or real matrix with negative elements.

sin( x)
The sine function applied elementwise to x. The result is returned as a real matrix if x is an integer or real matrix and as a complex matrix otherwise.

cos( x)
The cosine function applied elementwise to x. The result is returned as a real matrix if x is an integer or real matrix and as a complex matrix otherwise.

exp( x)
The exponential function applied elementwise to x. The result is returned as a real matrix if x is an integer or real matrix and as a complex matrix otherwise.

log( x)
The natural logarithm applied elementwise to x. The result is returned as a real matrix if x is an integer or real matrix and as a complex matrix otherwise. Raises an exception when x is an integer or real matrix with nonnegative elements, or a complex matrix with zero elements.

mul( x, y)
The elementwise product of x and y. The two matrices must have the same size and type.

div( x, y)
The elementwise division of x by y. The two matrices must have the same size and type.