'In-place operation on row ``i`` using two-arg functor whose args are
interpreted as ``(self[i, j], j)``.
Examples
>>> from sympy.matrices import eye
>>> M = eye(3)
>>> M.row_op(1, lambda v, j: v + 2*M[0, j]); M
Matrix([
[1, 0, 0],
[2, 1, 0],
[0, 0, 1]])
See Also
row
zip_row_op
col_op'

def row_op(self, i, f):

    i0 = (i * self.cols)
    ri = self._mat[i0:(i0 + self.cols)]
    self._mat[i0:(i0 + self.cols)] = [f(x, j) for (x, j) in zip(ri, list(range(self.cols)))]
