parent, [entries=True], [coerce_entries=True], [copy=0]) |
denominator,
get,
hessenberg_form,
nonzero_positions,
set,
sparse_columns,
sparse_rows,
submatrix_from_columns,
submatrix_from_rows,
swap_rows,
transpose
Further documentation:
ij) |
Like __getitem__ but with no type or bounds checking. For (i,j) access, returns 0 if access is out of bounds.
) |
Return the Hessenberg form of this matrix.
) |
Returns the set of pairs (i,j) such that self[i,j] != 0.
ij, x) |
Like __setitem__ but with no type or bounds checking. Only works for single entries, not whole rows.
columns) |
Return the submatrix of self of columns col[i] for i in the list of columns.
rows) |
Return the submatrix of self of rows row[i] for i in the list of rows.
r1, r2) |
Swap rows r1 and r2 of self.
) |
Returns the transpose of self, without changing self.
We create a matrix, compute its transpose, and note that the original matrix is not changed.
sage: M = MatrixSpace(RationalField(), 2, sparse=True) sage: A = M([1,2,3,4]) sage: B = A.transpose() sage: print B [1 3] [2 4] sage: print A [1 2] [3 4]
Instances of class Matrix_generic_sparse also have the following special methods:
__getitem__,
__mul__,
__rmul__,
__setitem__,
_dict,
_entries
Further documentation:
ij) |
INPUT: A[i, j] -- the i,j of A, and A[i] -- the i-th row of A.
ij, value) |
INPUT: A[i, j] = value -- set the (i,j) entry of A A[i] = value -- set the ith row of A
See About this document... for information on suggesting changes.