import options
+
def append_col(left, right):
"""
- Append the matrix ``right`` to the right side of the matrix ``left``.
+ Append two matrices side-by-side.
Parameters
----------
+
left, right : matrix
The two matrices to append to one another.
+ Returns
+ -------
+
+ matrix
+ A new matrix consisting of ``right`` appended to the right
+ of ``left``.
+
Examples
--------
"""
return matrix([left.trans(), right.trans()]).trans()
+
def append_row(top, bottom):
"""
- Append the matrix ``bottom`` to the bottom of the matrix ``top``.
+ Append two matrices top-to-bottom.
Parameters
----------
+
top, bottom : matrix
The two matrices to append to one another.
+ Returns
+ -------
+
+ matrix
+ A new matrix consisting of ``bottom`` appended below ``top``.
+
Examples
--------
symmat : matrix
The real symmetric matrix whose eigenvalues you want.
+ Returns
+ -------
+
+ list of float
+ A list of the eigenvalues (in no particular order) of ``symmat``.
Raises
------
+
TypeError
If the input matrix is not symmetric.
Returns
-------
+
matrix
A ``domain_dim``-by-``domain_dim`` dense integer identity matrix.
Returns
-------
+
float
The inner product of ``vec1`` and ``vec2``.
A place to collect the various options that "can be passed to the
underlying engine." Just kidding, they're constants and you can't
change them. But this makes the user interface real simple.
-"""
-# The absolute tolerance used in all "are these numbers equal" and "is
-# this number less than (or equal to) that other number" tests.
-ABS_TOL = 1e-7
+.. data:: ABS_TOL
-# The default output format for floating point numbers. It has been
-# chosen to match the ABS_TOL, in the sense that if x != y, then they
-# would not appear different when printed.
-FLOAT_FORMAT = '%.7f'
+ The absolute tolerance used in all "are these numbers equal" and "is
+ this number less than (or equal to) that other number" tests.
+
+.. data:: FLOAT_FORMAT
+
+ The default output format for floating point numbers. It has been
+ chosen to match the ``ABS_TOL``, in the sense that if ``x != y``,
+ then they would not appear different when printed.
-# The underlying CVXOPT solver can output debug information, and I
-# guess, so could we. But we don't want to because it's ugly.
+.. data:: VERBOSE
+
+ The underlying CVXOPT solver can output debug information, and I
+ guess, so could we. But we don't want to because it's ugly.
+
+"""
+ABS_TOL = 1e-7
+FLOAT_FORMAT = '%.7f'
VERBOSE = False