(self, other)
Subtracts the given value from the matrix.

        @param other: either a scalar or a matrix. Scalars will
          be subtracted from each element of the matrix. Matrices will
          be subtracted together elementwise.
        @return: the result matrix
Subtracts the given value from the matrix.
Subtracts the given value from the matrix .
def __sub__(self, other):
        """Subtracts the given value from the matrix.

        @param other: either a scalar or a matrix. Scalars will
          be subtracted from each element of the matrix. Matrices will
          be subtracted together elementwise.
        @return: the result matrix
        """
        if isinstance(other, Matrix):
            if self.shape != other.shape:
                raise ValueError("matrix shapes do not match")
            return self.__class__(
                [
                    [a - b for a, b in zip(row_a, row_b)]
                    for row_a, row_b in zip(self, other)
                ]
            )
        else:
            return self.__class__([[item - other for item in row] for row in self])
def __sub__ ( self , other ) : if isinstance ( other , Matrix ) : if self . shape != other . shape : raise ValueError ( "matrix shapes do not match" ) return self . __class__ ( [ [ a - b for a , b in zip ( row_a , row_b ) ] for row_a , row_b in zip ( self , other ) ] ) else : return self . __class__ ( [ [ item - other for item in row ] for row in self ] )