class_docstr: Class for the vector space of Hermitian matrices of size n.
  
  Parameters
  ----------
  n : int
      Integer representing the shapes of the matrices: n x n.
class_docstr_tok: ["Class","for","the","vector","space","of","Hermitian","matrices","of","size","n.","Parameters","--","--","--","--","--","n",":","int","Integer","representing","the","shapes","of","the","matrices",":","n","x","n","."]
docstr: Convert a Hermitian matrix into a vector.
  
  Parameters
  ----------
  matrix_representation : array-like, shape=[..., n, n]
      Matrix.
  
  Returns
  -------
  basis_representation : array-like, shape=[..., n(n+1)/2]
      Vector.
docstr_tok: ["Convert","a","Hermitian","matrix","into","a","vector",".","Parameters","--","--","--","--","--","matrix_representation",":","array-like",",","shape=","[","...",",","n",",","n","]","Matrix",".","Returns","--","--","--","-","basis_representation",":","array-like",",","shape=","[","...",",","n","(","n+1",")","\/2","]","Vector","."]
code: def basis_representation(matrix_representation):
      """Convert a Hermitian matrix into a vector.
  
      Parameters
      ----------
      matrix_representation : array-like, shape=[..., n, n]
          Matrix.
  
      Returns
      -------
      basis_representation : array-like, shape=[..., n(n+1)/2]
          Vector.
      """
      diag = Matrices.diagonal(matrix_representation)
  
      up_triang = gs.triu_to_vec(matrix_representation, k=1)
      real_part = gs.real(up_triang)
      complex_part = gs.imag(up_triang)
  
      vec = gs.hstack([diag, real_part, complex_part])
  
      return vec
  
file_path: geomstats/geomstats/geometry/hermitian_matrices.py
imports: import logging
  import geomstats.backend
  from geomstats import algebra_utils
  from geomstats.geometry.base import ComplexMatrixVectorSpace
  from geomstats.geometry.complex_matrices import ComplexMatrices, ComplexMatricesMetric
  from geomstats.geometry.matrices import Matrices
label_desc: Use image node_id 7 for calling the HermitianMatrices obj's underlying member method code with example usage: obj.basis_representation(matrix_representation) and returns: vec