'Fill self with the given value.
Notes
Unless many values are going to be deleted (i.e. set to zero)
this will create a matrix that is slower than a dense matrix in
operations.
Examples
>>> from sympy.matrices import SparseMatrix
>>> M = SparseMatrix.zeros(3); M
Matrix([
[0, 0, 0],
[0, 0, 0],
[0, 0, 0]])
>>> M.fill(1); M
Matrix([
[1, 1, 1],
[1, 1, 1],
[1, 1, 1]])'

def fill(self, value):

    if (not value):
        self._smat = {}
    else:
        v = self._sympify(value)
        self._smat = dict([((i, j), v) for i in range(self.rows) for j in range(self.cols)])
