class_docstr: Class for the vector space of symmetric 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","symmetric","matrices","of","size","n.","Parameters","--","--","--","--","--","n",":","int","Integer","representing","the","shapes","of","the","matrices",":","n","x","n","."]
docstr: Compute the basis of the vector space of symmetric matrices.
docstr_tok: ["Compute","the","basis","of","the","vector","space","of","symmetric","matrices","."]
code: def _create_basis(self):
      """Compute the basis of the vector space of symmetric matrices."""
      indices, values = [], []
      k = -1
      for row in range(self.n):
          for col in range(row, self.n):
              k += 1
              if row == col:
                  indices.append((k, row, row))
                  values.append(1.0)
              else:
                  indices.extend([(k, row, col), (k, col, row)])
                  values.extend([1.0, 1.0])
  
      return gs.array_from_sparse(
          indices, values, (k + 1, self.n, self.n)
      )
  
file_path: geomstats/geomstats/geometry/symmetric_matrices.py
imports: import geomstats.backend
  from geomstats.geometry.base import MatrixVectorSpace
  from geomstats.geometry.matrices import Matrices, MatricesMetric
label_desc: Use image node_id 3 for calling the SymmetricMatrices obj's underlying member method code with example usage: obj._create_basis() and returns: gs