(self, mean_variance_file, dim_number)
return 0
read mean variance file
        args:
            mean_variance_file: the input mean variance file
            dim_number: gen dim_number array
        return:
            -1: failed
            0: success
read mean variance file
        args:
            mean_variance_file: the input mean variance file
            dim_number: gen dim_number array
        return:
            -1: failed
            0: success
read mean variance file args : mean_variance_file : the input mean variance file dim_number : gen dim_number array return : - 1 : failed 0 : success
def _read_mean_variance(self, mean_variance_file, dim_number):
    """
        read mean variance file
        args:
            mean_variance_file: the input mean variance file
            dim_number: gen dim_number array
        return:
            -1: failed
            0: success
        """
    if not os.path.exists(mean_variance_file):
      return -1

    with open(mean_variance_file) as fp:
      input_list = fp.readlines()
      input_dim_length = len(input_list)
      if dim_number > input_dim_length:
        return -1

      self._mean_array = np.zeros([dim_number])
      self._variance_array = np.zeros([dim_number])
      for input_line_number in range(0, dim_number):
        tmp_mean, tmp_variance = input_list[input_line_number].strip().split()
        self._mean_array[input_line_number] = float(tmp_mean)
        self._variance_array[input_line_number] = math.sqrt(float(tmp_variance))
    self._mean_variance_statu = True
    return 0
def _read_mean_variance ( self , mean_variance_file , dim_number ) : if not os . path . exists ( mean_variance_file ) : return - 1 with open ( mean_variance_file ) as fp : input_list = fp . readlines ( ) input_dim_length = len ( input_list ) if dim_number > input_dim_length : return - 1 self . _mean_array = np . zeros ( [ dim_number ] ) self . _variance_array = np . zeros ( [ dim_number ] ) for input_line_number in range ( 0 , dim_number ) : tmp_mean , tmp_variance = input_list [ input_line_number ] . strip ( ) . split ( ) self . _mean_array [ input_line_number ] = float ( tmp_mean ) self . _variance_array [ input_line_number ] = math . sqrt ( float ( tmp_variance ) ) self . _mean_variance_statu = True return 0