'Returns a copy of row i of the matrix, as a (1 x n) sparse
matrix (row vector).'

def getrow(self, i):

    from .csr import csr_matrix
    m = self.shape[0]
    if (i < 0):
        i += m
    if ((i < 0) or (i >= m)):
        raise IndexError('index    out    of    bounds')
    row_selector = csr_matrix(([1], [[0], [i]]), shape=(1, m), dtype=self.dtype)
    return (row_selector * self)
