Code Duplication    Length = 6-7 lines in 2 locations

pyclustering/nnet/som.py 1 location

@@ 908-914 (lines=7) @@
905
                        if (neighbor > index):
906
                            axes.plot([self._weights[index][0], self._weights[neighbor][0]], [self._weights[index][1], self._weights[neighbor][1]], [self._weights[index][2], self._weights[neighbor][2]], 'g-', linewidth = 0.5);
907
                        
908
                
909
        plt.title("Network Structure");
910
        plt.grid();
911
        plt.show();

pyclustering/nnet/cnn.py 1 location

@@ 456-461 (lines=6) @@
453
                    if (self.__weights[i][j] > 0.0):
454
                        axes.plot([self.__location[i][0], self.__location[j][0]], [self.__location[i][1], self.__location[j][1]], 'b-', linewidth = 0.5);
455
            
456
            elif (dimension == 3):
457
                axes.scatter(self.__location[i][0], self.__location[i][1], self.__location[i][2], c = 'b', marker = 'o');
458
                
459
                for j in range(i, self.__num_osc, 1):    # draw connection between two points only one time
460
                    if (self.__weights[i][j] > 0.0):
461
                        axes.plot([self.__location[i][0], self.__location[j][0]], [self.__location[i][1], self.__location[j][1]], [self.__location[i][2], self.__location[j][2]], 'b-', linewidth = 0.5);
462
                
463
        plt.grid();
464
        plt.show();