base_ring, nrows, [ncols=False], [sparse=None]) |
base_ring,
basis,
dimension,
dims,
gen,
identity_matrix,
is_dense,
is_sparse,
matrix,
matrix_space,
ncols,
ngens,
nrows,
random_element
Further documentation:
[x=True], [coerce_entries=True], [copy=0]) |
Create a matrix in self. The entries can be specified either as a single list of length nrows*ncols, or as a list of lists.
sage: Z = IntegerRing() sage: M = MatrixSpace(Z,2) sage: M([[1,0],[0,-1]]) [ 1 0] [ 0 -1] sage: M([1,0,0,-1]) [ 1 0] [ 0 -1]
[X=True], [prob=1.0], [coerce=[-2, -1, 1, 2]]) |
Returns a random element of self.
Instances of class MatrixSpace_generic also have the following special methods:
__call__,
__cmp__,
__contains__,
__repr__,
_coerce_,
_get_matrix_class,
_latex_
See About this document... for information on suggesting changes.