python function that satisfies the following conditions class…

Question Answered step-by-step python function that satisfies the following conditions class… python function that satisfies the following conditionsclass RMatrix:    def __init__(self, data, shape, dtype = “d”):        “””        Initializes a dense row-major (“C-style”) matrix        param data: An iterable of all the data elements        param shape: A tuple giving the (nrow, ncol)        param dtype: The data type (defaults to double)        “””        self.nrow, self.ncol = shape        self.data = array(dtype, data)    def rowsums(self):        “””        Calculates and returns the sums of the matrix rows.        param self: An instance of RMatrix.        returns: A list of numbers giving the sums of each row.        “””        pass Computer Science Engineering & Technology Python Programming DS 5010 Share QuestionEmailCopy link Comments (0)