class_docstr: Class for the space of matrices (m, n).
  
  Parameters
  ----------
  m, n : int
      Integers representing the shapes of the matrices: m x n.
class_docstr_tok: ["Class","for","the","space","of","matrices","(","m",",","n",")",".","Parameters","--","--","--","--","--","m",",","n",":","int","Integers","representing","the","shapes","of","the","matrices",":","m","x","n","."]
docstr: Make a matrix upper triangular.
  
  Make a matrix upper triangular by zeroing
  out lower elements.
  
  Parameters
  ----------
  mat : array-like, shape=[..., n, n]
      Matrix.
  
  Returns
  -------
  triu : array-like, shape=[..., n, n]
docstr_tok: ["Make","a","matrix","upper","triangular",".","Make","a","matrix","upper","triangular","by","zeroing","out","lower","elements",".","Parameters","--","--","--","--","--","mat",":","array-like",",","shape=","[","...",",","n",",","n","]","Matrix",".","Returns","--","--","--","-","triu",":","array-like",",","shape=","[","...",",","n",",","n","]"]
code: def to_upper_triangular(cls, mat):
      """Make a matrix upper triangular.
  
      Make a matrix upper triangular by zeroing
      out lower elements.
  
      Parameters
      ----------
      mat : array-like, shape=[..., n, n]
          Matrix.
  
      Returns
      -------
      triu : array-like, shape=[..., n, n]
      """
      return gs.triu(mat)
  
imports: import logging
  import math
  from functools import reduce
  import geomstats.backend
  import geomstats.errors
  from geomstats.algebra_utils import flip_determinant, from_vector_to_diagonal_matrix
  from geomstats.geometry.base import MatrixVectorSpace
  from geomstats.geometry.euclidean import EuclideanMetric
  from geomstats.vectorization import repeat_out
label_desc: Use image node_id 22 for calling the Matrices obj's underlying member method code with example usage: obj.to_upper_triangular(cls, mat) and returns: gs