Fix comment in ...variation_of_parameters function
Escape symbol names that are python keywords during printing
Tests for symbol name escaping
Fix test failures
Escape function names that are python keywords during printing
Tests for function name escaping
Avoid name clashes between symbols and functions
And fix a stupid copy && paster mistake
Do not change symbol name when escaping its variable name
xfailing function name escaping test
Make function name escaping work
Adapt tests and address review comments
Merge pull request #1549 from zanzibar7/ode_comment_correction

Fix comment in ...variation_of_parameters function
Merge pull request #1527 from raoulb/print_python

Escape symbol names that are python keywords during printing
allow submatrix assignment given top left indices

There is no need for the redundant slice when assigning a matrix
to a subregion of another matrix; it is sufficient to just give
the top left target position in the matrix and the list form (or
Matrix form) of what should be put there:

>>> i = eye(3)
>>> i[0,0] = Matrix(range(3))
>>> i
[0, 0, 0]
[1, 1, 0]
[2, 0, 1]
>>> i[0,0] = Matrix([range(3)])
>>> i
[0, 1, 2]
[1, 1, 0]
[2, 0, 1]
>>> i[0,0]=[[4,4]]
>>> i
[4, 4, 2]
[1, 1, 0]
[2, 0, 1]

Also, is_sequence(Matrix) is True so the include values were removed
from tests of is_sequence that included some sort of Matrix.

A little care needs to be used when checking types:
  Matrix, SparseMatrix derive from MatrixBase
  MatrixBase and MatrixExpr (which doesn't derive from MatrixBase)
    are all sequences -- hence the use of `ismat` when checking
    for submatrix assignment.
matrix cleanup

Add a copy method to replace M[:, :] (which requires slice calculations)

simplified tolist

simplified examples to show the salient feature being deomonstrated;
rather than using a variety of numbers, zeros and ones are now used.

SparseMatrix __setitem__ can now translate an integer to a key
S[1] = 42 will figure out the i,j location of position 1

simplified toMatrix by using the tolist method

gave SparseMatrix its own tolist method since S.mat is a dictionary
and using the default parent class tolist method did not work for
SparseMatrix

Add an efficient negation of a SparseMatrix

simplified the add method for SparseMatrix
spaces after commas added
smarter multiply and other SparseMatrix methods added

These are some of the methods that Sherjil worked on in PR #456.
The _lil_row_major is modified from what he presented there. In addition
col_join was added, too, for SparseMatrix.
matrices: add normalize and sort options to diagonalize
matrices: SparseMatrix mat -> smat

[regarding mat -> smat, see below]

minor edits

put a temporary as_int in place until this is merged with 0.7.2

MUTABLEMATRIX

since _cholesky is a parent-class function, make sure it returns
the same type as was received. (SparseMatrix doesn't have a _new
method so either one has to be added or -- as here -- the general
instantiation using the type of self must be used.)

elaborate the _handle_creation_inputs docstring and reorganize
code so there is only one error message location at the end of the
if-blocks.

__setitem__ and __getitem__ are now defined in MutableMatrix and
overridden in SparseMatrix

SPARSEMATRIX

refactored the __init__ code for SparseMatrix and removed the TODO
since it appears that the only things left to process are the
numpy array and the flat list...and I don't see any sparse-smarts
that can be applied to those.

copy is put here to override the MutableMatrix version because...
** smat ** rather than mat is used to store the sparse matrix dict;
if SparseMatrix shares the name 'mat' with MutableMatrix, it is
possible to call methods on Sparse that are only defined to work
in Mutable -- methods that operate on mat. Now, at least, an error
will be raised signaling the need to write a sparse routine for the
desired method.

TODO: change indexing and mat storage so __getitem__ always works
quickly with M[(i, j)] and then perhaps smat can be changed back to
mat.

rowdecomp is such a low-level activity that it is simply inlined
where it is needed.

a duplicate multiply was removed and _lil_row_major removed (and the
row_list is now used in-place in multiply)

all other changes involve changing mat to smat or removing obsolete tests
and editing whitespace.