If you know only part of the name of a Sage command and want to
know where it occurs in Sage,
a new option for Sage 0.10.11 has been added to make it
easier to hunt it down. Just type
sage -grep <string>
to find all occurences of <string> in the Sage source code.
For example,
was@form:~/s/local/bin$ sage -grep berlekamp_massey matrix/all.py:from berlekamp_massey import berlekamp_massey matrix/berlekamp_massey.py:def berlekamp_massey(a): matrix/matrix.py:import berlekamp_massey matrix/matrix.py: g = berlekamp_massey.berlekamp_massey(cols[i].list())
Type help(foo) or foo?? for help and foo.[tab]
for searching of Sage commands. Type help() for Python commands.
For example
help(Matrix)
Help on function Matrix in module sage.matrix.constructor:
Matrix(R, nrows, ncols, entries = 0, sparse = False)
Create a matrix.
INPUT:
R -- ring
nrows -- int; number of rows
ncols -- int; number of columns
entries -- list; entries of the matrix
sparse -- bool (default: False); whether or not to store matrices as sparse
OUTPUT:
a matrix
EXAMPLES:
sage: Matrix(RationalField(), 2, 2, [1,2,3,4])
[1 2]
[3 4]
sage: Matrix(FiniteField(5), 2, 3, range(6))
[0 1 2]
[3 4 0]
sage: Matrix(IntegerRing(), 10, 10, range(100)).parent()
Full MatrixSpace of 10 by 10 dense matrices over Integer Ring
sage: Matrix(IntegerRing(), 10, 10, range(100), sparse = True).parent()
Full MatrixSpace of 10 by 10 sparse matrices over Integer Ring
See About this document... for information on suggesting changes.