def _create_initial_weights(self, init_type):
dim_info = dimension_info(self._data)<EOL>step_x = dim_info.get_center()[<NUM_LIT:0>]<EOL>if self._rows > <NUM_LIT:1>: step_x = dim_info.get_width()[<NUM_LIT:0>] / (self._rows - <NUM_LIT:1>);<EOL>step_y = <NUM_LIT:0.0><EOL>if dim_info.get_dimensions() > <NUM_LIT:1>:<EOL><INDENT>step_y = dim_info.get_center()[<NUM_LIT:1>]<EOL>if self._cols > <NUM_LIT:1>: step_y = dim_info.get_width()[<NUM_LIT:1>] / (self._cols - <NUM_LIT:1>);<EOL><DEDENT>random.seed()<EOL>if init_type == type_init.uniform_grid:<EOL><INDENT>self._weights = [ [ [] for i in range(dim_info.get_dimensions()) ] for j in range(self._size)]<EOL>for i in range(self._size):<EOL><INDENT>location = self._location[i]<EOL>for dim in range(dim_info.get_dimensions()):<EOL><INDENT>if dim == <NUM_LIT:0>:<EOL><INDENT>if self._rows > <NUM_LIT:1>:<EOL><INDENT>self._weights[i][dim] = dim_info.get_minimum_coordinate()[dim] + step_x * location[dim]<EOL><DEDENT>else:<EOL><INDENT>self._weights[i][dim] = dim_info.get_center()[dim]<EOL><DEDENT><DEDENT>elif dim == <NUM_LIT:1>:<EOL><INDENT>if self._cols > <NUM_LIT:1>:<EOL><INDENT>self._weights[i][dim] = dim_info.get_minimum_coordinate()[dim] + step_y * location[dim]<EOL><DEDENT>else:<EOL><INDENT>self._weights[i][dim] = dim_info.get_center()[dim]<EOL><DEDENT><DEDENT>else:<EOL><INDENT>self._weights[i][dim] = dim_info.get_center()[dim]<EOL><DEDENT><DEDENT><DEDENT><DEDENT>elif init_type == type_init.random_surface:<EOL><INDENT>self._weights = [[random.uniform(dim_info.get_minimum_coordinate()[i], dim_info.get_maximum_coordinate()[i]) for i in range(dim_info.get_dimensions())] for _ in range(self._size)]<EOL><DEDENT>elif init_type == type_init.random_centroid:<EOL><INDENT>self._weights = [[(random.random() + dim_info.get_center()[i])  for i in range(dim_info.get_dimensions())] for _ in range(self._size)]<EOL><DEDENT>else:<EOL><INDENT>self._weights = [[random.random() for i in range(dim_info.get_dimensions())] for _ in range(self._size)]<EOL><DEDENT>
!
        @brief Creates initial weights for neurons in line with the specified initialization.

        @param[in] init_type (type_init): Type of initialization of initial neuron weights (random, random in center of the input data, random distributed in data, ditributed in line with uniform grid).