class_docstr:     Do genetic algorithm to solve the TSP (Travelling Salesman Problem)
      Parameters
      ----------------
      func : function
          The func you want to do optimal.
          It inputs a candidate solution(a routine), and return the costs of the routine.
      size_pop : int
          Size of population
      max_iter : int
          Max of iter
      prob_mut : float between 0 and 1
          Probability of mutation
      Attributes
      ----------------------
      Lind : array_like
           The num of genes corresponding to every variable of func（segments）
      generation_best_X : array_like. Size is max_iter.
          Best X of every generation
      generation_best_ranking : array_like. Size if max_iter.
          Best ranking of every generation
      Examples
      -------------
      Firstly, your data (the distance matrix). Here I generate the data randomly as a demo:
      ```py
      num_points = 8
      points_coordinate = np.random.rand(num_points, 2)  # generate coordinate of points
      distance_matrix = spatial.distance.cdist(points_coordinate, points_coordinate, metric='euclidean')
      print('distance_matrix is: 
  ', distance_matrix)
      def cal_total_distance(routine):
          num_points, = routine.shape
          return sum([distance_matrix[routine[i % num_points], routine[(i + 1) % num_points]] for i in range(num_points)])
      ```
      Do GA
      ```py
      from sko.GA import GA_TSP
      ga_tsp = GA_TSP(func=cal_total_distance, n_dim=8, pop=50, max_iter=200, Pm=0.001)
      best_points, best_distance = ga_tsp.run()
      ```
      
code: def chrom2x(self, Chrom):
      return Chrom
  
imports: import numpy
  from .base import SkoBase
  from sko.tools import func_transformer
  from abc import ABCMeta, abstractmethod
  from .operators import crossover, mutation, ranking, selection
label_desc: Use image node_id 3 for calling the GA_TSP obj's underlying member method code with example usage: obj.chrom2x(Chrom) and returns: Chrom