'Cache a matrix by its name.
Parameters
name : str
A descriptive name for the matrix, like "identity2".
m : list of lists
The raw matrix data as a sympy Matrix.'

def cache_matrix(self, name, m):

    try:
        self._sympy_matrix(name, m)
    except ImportError:
        pass
    try:
        self._numpy_matrix(name, m)
    except ImportError:
        pass
    try:
        self._scipy_sparse_matrix(name, m)
    except ImportError:
        pass
