code: def xposeg(matrix, nrow, ncol):
      
      matrix = stypes.toDoubleMatrix(matrix)
      mout = stypes.emptyDoubleMatrix(x=ncol, y=nrow)
      ncol = ctypes.c_int(ncol)
      nrow = ctypes.c_int(nrow)
      libspice.xposeg_c(matrix, nrow, ncol, mout)
      return stypes.cMatrixToNumpy(mout)
docs: Transpose a matrix of arbitrary size
      in place, the matrix need not be square.
  
      http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/xposeg_c.html
  
      :param matrix: Matrix to be transposed 
      :type matrix: NxM-Element Array of floats
      :param nrow: Number of rows of input matrix.
      :type nrow: int
      :param ncol: Number of columns of input matrix
      :type ncol: int
      :return: Transposed matrix
      :rtype: NxM-Element Array of floats