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: Return a matricized form of the vector.
  
  Matricize a vector (compatible with vectorization on data axis 0).
  The reverse operation is matrices.flatten. These operations are often
  called matrix vectorization / matricization in mathematics
  (https://en.wikipedia.org/wiki/Tensor_reshaping).
  The names flatten / reshape were chosen to avoid  confusion with
  vectorization on data axis 0.
  
  Parameters
  ----------
  vec : array-like, shape=[..., m * n]
      Vector.
  
  Returns
  -------
  mat : array-like, shape=[..., m, n]
      Matricized copy of vec.
docstr_tok: ["Return","a","matricized","form","of","the","vector",".","Matricize","a","vector","(","compatible","with","vectorization","on","data","axis","0",")",".","The","reverse","operation","is","matrices.flatten",".","These","operations","are","often","called","matrix","vectorization","\/","matricization","in","mathematics","(","https",":","\/\/en.wikipedia.org\/wiki\/Tensor_reshaping",")",".","The","names","flatten","\/","reshape","were","chosen","to","avoid","confusion","with","vectorization","on","data","axis","0",".","Parameters","--","--","--","--","--","vec",":","array-like",",","shape=","[","...",",","m","*","n","]","Vector",".","Returns","--","--","--","-","mat",":","array-like",",","shape=","[","...",",","m",",","n","]","Matricized","copy","of","vec","."]
code: def reshape(self, vec):
      """Return a matricized form of the vector.
  
      Matricize a vector (compatible with vectorization on data axis 0).
      The reverse operation is matrices.flatten. These operations are often
      called matrix vectorization / matricization in mathematics
      (https://en.wikipedia.org/wiki/Tensor_reshaping).
      The names flatten / reshape were chosen to avoid  confusion with
      vectorization on data axis 0.
  
      Parameters
      ----------
      vec : array-like, shape=[..., m * n]
          Vector.
  
      Returns
      -------
      mat : array-like, shape=[..., m, n]
          Matricized copy of vec.
      """
      is_data_vectorized_on_axis_0 = gs.ndim(gs.array(vec)) == 2
      if is_data_vectorized_on_axis_0:
          vector_size = vec.shape[1]
          shape = (vec.shape[0], self.m, self.n)
      else:
          vector_size = vec.shape[0]
          shape = (
              self.m,
              self.n,
          )
  
      if vector_size != self.m * self.n:
          raise ValueError("Incompatible vector and matrix sizes")
      return gs.reshape(vec, shape)
  
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 33 for calling the Matrices obj's underlying member method code with example usage: obj.reshape(vec) and returns: gs