Skip to content

Commit

Permalink
trac 6718: spell-check all modules under sage/matrix
Browse files Browse the repository at this point in the history
  • Loading branch information
Minh Van Nguyen committed Aug 9, 2009
1 parent fda17eb commit c483224
Show file tree
Hide file tree
Showing 26 changed files with 95 additions and 95 deletions.
4 changes: 2 additions & 2 deletions src/sage/matrix/action.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ cdef class MatrixMatrixAction(MatrixMulAction):
cpdef Element _call_(self, g, s):
"""
EXAMPLES:
Respects compatable subdivisions:
Respects compatible subdivisions:
sage: M = matrix(5, 5, prime_range(100))
sage: M.subdivide(2,3); M
[ 2 3 5| 7 11]
Expand Down Expand Up @@ -117,7 +117,7 @@ cdef class MatrixMatrixAction(MatrixMulAction):
[1048]
[3056]
If the subdivisions aren't compatable, ignore them.
If the subdivisions aren't compatible, ignore them.
sage: N.subdivide(1,1); N
[ 0| 1]
[--+--]
Expand Down
14 changes: 7 additions & 7 deletions src/sage/matrix/constructor.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def matrix(*args, **kwds):
To construct a multiple of the identity (`cI`), you can
specify square dimensions and pass in `c`. Calling matrix()
with a Sage object may return something that makes sense. Calling
matrix() with a numpy array will convert the array to a matrix.
matrix() with a NumPy array will convert the array to a matrix.
The ring, number of rows, and number of columns of the matrix can
be specified by setting the ring, nrows, or ncols parameters or by
Expand Down Expand Up @@ -588,9 +588,9 @@ def matrix(*args, **kwds):
try:
return matrix( [list(row) for row in list(num_array)])
except TypeError:
raise TypeError("cannot convert numpy matrix to SAGE matrix")
raise TypeError("cannot convert NumPy matrix to Sage matrix")
else:
raise TypeError("cannot convert numpy matrix to SAGE matrix")
raise TypeError("cannot convert NumPy matrix to Sage matrix")

return m
elif nrows is not None and ncols is not None:
Expand Down Expand Up @@ -954,7 +954,7 @@ def zero_matrix(ring, nrows, ncols=None, sparse=False):

def block_matrix(sub_matrices, nrows=None, ncols=None, subdivide=True):
"""
Returns a larger matrix made by concatinating the sub_matrices
Returns a larger matrix made by concatenating the sub_matrices
(rows first, then columns). For example, the matrix
::
Expand Down Expand Up @@ -1010,7 +1010,7 @@ def block_matrix(sub_matrices, nrows=None, ncols=None, subdivide=True):
[ 3 9| -3 -9|-5/12 3/8| 300 900]
[ 6 10| -6 -10| 1/4 -1/8| 600 1000]
It handle baserings nicely too::
It handle base rings nicely too::
sage: R.<x> = ZZ['x']
sage: block_matrix([1/2, A, 0, x-1])
Expand Down Expand Up @@ -1044,7 +1044,7 @@ def block_matrix(sub_matrices, nrows=None, ncols=None, subdivide=True):
elif ncols is None:
ncols = int(n/nrows)
if nrows * ncols != n:
raise ValueError, "Given number of rows (%s), columns (%s) incompatable with number of submatrices (%s)" % (nrows, ncols, n)
raise ValueError, "Given number of rows (%s), columns (%s) incompatible with number of submatrices (%s)" % (nrows, ncols, n)

# empty matrix
if n == 0:
Expand Down Expand Up @@ -1085,7 +1085,7 @@ def block_matrix(sub_matrices, nrows=None, ncols=None, subdivide=True):
if R is not ZZ:
base = sage.categories.pushout.pushout(base, R)

# finally concatinate
# finally concatenate
for i in range(nrows):
for j in range(ncols):
# coerce
Expand Down
4 changes: 2 additions & 2 deletions src/sage/matrix/docs.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ class derived from Matrix). They can be either sparse or dense, and
entries. Once a matrix `A` is made immutable using
``A.set_immutable()`` the entries of `A`
cannot be changed, and `A` can never be made mutable again.
However, properies of `A` such as its rank, characteristic
However, properties of `A` such as its rank, characteristic
polynomial, etc., are all cached so computations involving
`A` may be more efficient. Once `A` is made
immutable it cannot be changed back. However, one can obtain a
Expand Down Expand Up @@ -212,6 +212,6 @@ class derived from Matrix). They can be either sparse or dense, and
- Kernels of matrices
Implement only a left_kernel() or right_kernel() method, whichever requires
the least overhead (usually meaning little or no transpose'ing). Let the
the least overhead (usually meaning little or no transposing). Let the
methods in the matrix2 class handle left, right, generic kernel distinctions.
"""
14 changes: 7 additions & 7 deletions src/sage/matrix/matrix0.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -398,12 +398,12 @@ cdef class Matrix(sage.structure.element.Matrix):
Matrices are always mutable by default, i.e., you can change their
entries using ``A[i,j] = x``. However, mutable matrices
aren't hasheable, so can't be used as keys in dictionaries, etc.
aren't hashable, so can't be used as keys in dictionaries, etc.
Also, often when implementing a class, you might compute a matrix
associated to it, e.g., the matrix of a Hecke operator. If you
return this matrix to the user you're really returning a reference
and the user could then change an entry; this could be confusing.
Thus you shoulds set such a matrix immutable.
Thus you should set such a matrix immutable.
EXAMPLES::
Expand All @@ -415,7 +415,7 @@ cdef class Matrix(sage.structure.element.Matrix):
[10 1]
[ 2 3]
Mutable matrices are not hasheable, so can't be used as keys for
Mutable matrices are not hashable, so can't be used as keys for
dictionaries::
sage: hash(A)
Expand All @@ -427,7 +427,7 @@ cdef class Matrix(sage.structure.element.Matrix):
...
TypeError: mutable matrices are unhashable
If we make A immutable it suddenly is hasheable.
If we make A immutable it suddenly is hashable.
::
Expand Down Expand Up @@ -519,7 +519,7 @@ cdef class Matrix(sage.structure.element.Matrix):
## sage: a._get_very_unsafe(0,1)
## 1

## If you do \code{a.\_get\_very\_unsafe(0,10)} you'll very likely crash SAGE
## If you do \code{a.\_get\_very\_unsafe(0,10)} you'll very likely crash Sage
## completely.
## """
## return self.get_unsafe(i, j)
Expand Down Expand Up @@ -1679,7 +1679,7 @@ cdef class Matrix(sage.structure.element.Matrix):
from sage.server.support import EMBEDDED_MODE

# jsmath doesn't know the command \hline, so have to do things
# differently (and not as atractively) in embedded mode:
# differently (and not as attractively) in embedded mode:
# construct an array with a subarray for each block.
if len(row_divs) + len(col_divs) > 0 and EMBEDDED_MODE:
for r in range(len(row_divs)+1):
Expand Down Expand Up @@ -3795,7 +3795,7 @@ cdef class Matrix(sage.structure.element.Matrix):
of coefficients. A dense matrix and a sparse matrix are equal if
their coefficients are the same.
EXAMPLES: EXAMPLE cmparing sparse and dense matrices::
EXAMPLES: EXAMPLE comparing sparse and dense matrices::
sage: matrix(QQ,2,range(4)) == matrix(QQ,2,range(4),sparse=True)
True
Expand Down
4 changes: 2 additions & 2 deletions src/sage/matrix/matrix1.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ cdef class Matrix(matrix0.Matrix):

def _pari_init_(self):
"""
Return a string defining a gp representation of self.
Return a string defining a GP representation of self.
EXAMPLES::
Expand Down Expand Up @@ -1059,7 +1059,7 @@ cdef class Matrix(matrix0.Matrix):
- Jaap Spies (2006-02-18)
- Didier Deshommes: some pyrex speedups implemented
- Didier Deshommes: some Pyrex speedups implemented
"""
if not PY_TYPE_CHECK(rows, list):
raise TypeError, "rows must be a list of integers"
Expand Down
12 changes: 6 additions & 6 deletions src/sage/matrix/matrix2.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -939,7 +939,7 @@ cdef class Matrix(matrix1.Matrix):
Return the determinant of self.
ALGORITHM: For small matrices (n4), this is computed using the
naive formula For integral domains, the charpoly is computed (using
naive formula For integral domains, the characteristic polynomial is computed (using
hessenberg form) Otherwise this is computed using the very stupid
expansion by minors stupid *naive generic algorithm*. For matrices
over more most rings more sophisticated algorithms can be used.
Expand Down Expand Up @@ -3531,7 +3531,7 @@ cdef class Matrix(matrix1.Matrix):

if not self.base_ring().is_exact():
from warnings import warn
warn("Using generic algorithm for an inexact ring, which may result in garbarge from numerical precision issues.")
warn("Using generic algorithm for an inexact ring, which may result in garbage from numerical precision issues.")

V = []
from sage.rings.qqbar import QQbar
Expand Down Expand Up @@ -5129,7 +5129,7 @@ cdef class Matrix(matrix1.Matrix):
EXAMPLES:
Here is an example over the real double field; internally, this uses scipy::
Here is an example over the real double field; internally, this uses SciPy::
sage: r = matrix(RDF, 5, 5, [ 0,0,0,0,1, 1,1,1,1,1, 16,8,4,2,1, 81,27,9,3,1, 256,64,16,4,1 ])
sage: m = r * r.transpose(); m
Expand Down Expand Up @@ -5294,7 +5294,7 @@ cdef class Matrix(matrix1.Matrix):
10000
In this example the Hadamard bound has to be computed
(automatically) using mpfr instead of doubles, since doubles
(automatically) using MPFR instead of doubles, since doubles
overflow::
sage: a = matrix(ZZ, 2, [2^10000,3^10000,2^50,3^19292])
Expand Down Expand Up @@ -6226,7 +6226,7 @@ def _smith_onestep(m):
def _dim_cmp(x,y):
"""
Used internally by matrix functions. Given 2-tuples (x,y), returns
their comparision based on the first component.
their comparison based on the first component.
EXAMPLES::
Expand Down Expand Up @@ -6285,7 +6285,7 @@ def _choose(Py_ssize_t n, Py_ssize_t t):
"""
Returns all possible sublists of length t from range(n)
Based on algoritm T from Knuth's taocp part 4: 7.2.1.3 p.5 This
Based on algorithm T from Knuth's taocp part 4: 7.2.1.3 p.5 This
function replaces the one based on algorithm L because it is
faster.
Expand Down
4 changes: 2 additions & 2 deletions src/sage/matrix/matrix_complex_double_dense.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ TESTS::
AUTHORS:
- Jason Grout (2008-09): switch to numpy backend
- Jason Grout (2008-09): switch to NumPy backend
- Josh Kantor
Expand Down Expand Up @@ -93,7 +93,7 @@ cdef class Matrix_complex_double_dense(matrix_double_dense.Matrix_double_dense):
# * set_unsafe
# * get_unsafe
# * __richcmp__ -- always the same
# * __hash__ -- alway simple
# * __hash__ -- always simple
########################################################################
def __new__(self, parent, entries, copy, coerce):
global numpy
Expand Down
8 changes: 4 additions & 4 deletions src/sage/matrix/matrix_cyclo_dense.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -1081,7 +1081,7 @@ cdef class Matrix_cyclo_dense(matrix_dense.Matrix_dense):
OUTPUT:
matrix over GF(p) whose columns correspond to the entries
of all the charpolys of the reduction of self modulo all
of all the characteristic polynomials of the reduction of self modulo all
the primes over p.
EXAMPLES:
Expand All @@ -1095,12 +1095,12 @@ cdef class Matrix_cyclo_dense(matrix_dense.Matrix_dense):
[4 0 0]
[0 0 0]
"""
tm = verbose("Computing characteristic polynomial of cyclomotic matrix modulo %s."%p)
tm = verbose("Computing characteristic polynomial of cyclotomic matrix modulo %s."%p)
# Reduce self modulo all primes over p
R, denom = self._reductions(p)
# Compute the characteristic polynomial of each reduced matrix
F = [A.charpoly('x') for A in R]
# Put the charpolys together as the rows of a mod-p matrix
# Put the characteristic polynomials together as the rows of a mod-p matrix
k = R[0].base_ring()
S = matrix(k, len(F), self.nrows()+1, [f.list() for f in F])
# multiply by inverse of reduction matrix to lift
Expand Down Expand Up @@ -1467,7 +1467,7 @@ cdef class Matrix_cyclo_dense(matrix_dense.Matrix_dense):
found += 1
else:
# this means that the rank profile mod this
# prime is worse than those that came befroe,
# prime is worse than those that came before,
# so we just loop
p = previous_prime(p)
continue
Expand Down
2 changes: 1 addition & 1 deletion src/sage/matrix/matrix_dense.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ cdef class Matrix_dense(matrix.Matrix):

def antitranspose(self):
"""
Returns the anittranspose of self, without changing self.
Returns the antitranspose of self, without changing self.
EXAMPLES::
Expand Down
12 changes: 6 additions & 6 deletions src/sage/matrix/matrix_double_dense.pyx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""
Dense matrices using a numpy backend. This serves as a base class for
Dense matrices using a NumPy backend. This serves as a base class for
dense matrices over Real Double Field and Complex Double Field.
EXAMPLES:
Expand All @@ -23,7 +23,7 @@ TESTS:
True
AUTHORS:
-- Jason Grout, Sep 2008: switch to numpy backend, factored out the Matrix_double_dense class
-- Jason Grout, Sep 2008: switch to NumPy backend, factored out the Matrix_double_dense class
-- Josh Kantor
-- William Stein: many bug fixes and touch ups.
"""
Expand Down Expand Up @@ -86,7 +86,7 @@ cdef class Matrix_double_dense(matrix_dense.Matrix_dense):
# * set_unsafe
# * get_unsafe
# * __richcmp__ -- always the same
# * __hash__ -- alway simple
# * __hash__ -- always simple
########################################################################
def __new__(self, parent, entries, copy, coerce):
"""
Expand All @@ -104,7 +104,7 @@ cdef class Matrix_double_dense(matrix_dense.Matrix_dense):
EXAMPLE:
In this example, we throw away the current matrix and make a
new unitialized matrix representing the data for the class.
new uninitialized matrix representing the data for the class.
sage: a=matrix(RDF, 3, range(9))
sage: a.__create_matrix__()
"""
Expand Down Expand Up @@ -260,7 +260,7 @@ cdef class Matrix_double_dense(matrix_dense.Matrix_dense):

# We call the self._python_dtype function on the value since
# numpy does not know how to deal with complex numbers other
# than the builtin complex number type.
# than the built-in complex number type.
cdef int status
status = cnumpy.PyArray_SETITEM(self._matrix_numpy,
cnumpy.PyArray_GETPTR2(self._matrix_numpy, i, j),
Expand Down Expand Up @@ -883,7 +883,7 @@ cdef class Matrix_double_dense(matrix_dense.Matrix_dense):
Compute the log of the absolute value of the determinant
using LU decomposition.
NOTE: This is useful if the usual determinant overlows.
NOTE: This is useful if the usual determinant overflows.
EXAMPLES:
sage: m = matrix(RDF,2,2,range(4)); m
Expand Down
2 changes: 1 addition & 1 deletion src/sage/matrix/matrix_generic_dense.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ cdef class Matrix_generic_dense(matrix_dense.Matrix_dense):
entries = list(entries)
is_list = 1
except TypeError:
raise TypeError, "entries must be coercible to a list or the basering"
raise TypeError, "entries must be coercible to a list or the base ring"

else:
is_list = 1
Expand Down
2 changes: 1 addition & 1 deletion src/sage/matrix/matrix_integer_2x2.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ cdef class Matrix_integer_2x2(matrix_dense.Matrix_dense):
entries = list(entries)
is_list = 1
except TypeError:
raise TypeError, "entries must be coercible to a list or the basering"
raise TypeError, "entries must be coercible to a list or the base ring"

else:
is_list = 1
Expand Down
Loading

0 comments on commit c483224

Please sign in to comment.