class_docstr: Simple matrix data type.
  
  Of course there are much more advanced matrix data types for Python (for
  instance, the C{ndarray} data type of Numeric Python) and this implementation
  does not want to compete with them. The only role of this data type is to
  provide a convenient interface for the matrices returned by the C{Graph}
  object (for instance, allow indexing with tuples in the case of adjacency
  matrices and so on).
class_docstr_tok: ["Simple","matrix","data","type",".","Of","course","there","are","much","more","advanced","matrix","data","types","for","Python","(","for","instance",",","the","C","{","ndarray","}","data","type","of","Numeric","Python",")","and","this","implementation","does","not","want","to","compete","with","them",".","The","only","role","of","this","data","type","is","to","provide","a","convenient","interface","for","the","matrices","returned","by","the","C","{","Graph","}","object","(","for","instance",",","allow","indexing","with","tuples","in","the","case","of","adjacency","matrices","and","so","on",")","."]
docstr: 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
code: 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]
          )
  
label_desc: Use image node_id 16 for calling the Matrix obj's underlying member method code with example usage: obj.__sub__(other) and returns: self, self