'Divide this matrix by a second sparse matrix.'

def _divide_sparse(self, other):

    if (other.shape != self.shape):
        raise ValueError('inconsistent    shapes')
    r = self._binopt(other, '_eldiv_')
    if np.issubdtype(r.dtype, np.inexact):
        out = np.empty(self.shape, dtype=self.dtype)
        out.fill(np.nan)
        (row, col) = other.nonzero()
        out[(row, col)] = 0
        r = r.tocoo()
        out[(r.row, r.col)] = r.data
        out = np.matrix(out)
    else:
        out = r
    return out
