Code Duplication    Length = 2-2 lines in 3 locations

pyclustering/cluster/syncnet.py 2 locations

@@ 314-315 (lines=2) @@
311
            if (self._ena_conn_weight is True):
312
                conn_weight = self._conn_weight[index][k];
313
                
314
            phase += conn_weight * self._weight * math.sin(self._phases[k] - teta);
315
        
316
        divider = len(neighbors);
317
        if (divider == 0):
318
            divider = 1.0;
@@ 309-310 (lines=2) @@
306
        phase = 0.0;      # phase of a specified oscillator that will calculated in line with current env. states.
307
        
308
        neighbors = self.get_neighbors(index);
309
        for k in neighbors:
310
            conn_weight = 1.0;
311
            if (self._ena_conn_weight is True):
312
                conn_weight = self._conn_weight[index][k];
313
                

pyclustering/nnet/cnn.py 1 location

@@ 406-407 (lines=2) @@
403
    def __create_surface(self, dimension):
404
        """!
405
        @brief Prepares surface for showing network structure in line with specified dimension.
406
        
407
        @param[in] dimension (uint): Dimension of processed data (external stimulus).
408
        
409
        @return (tuple) Description of surface for drawing network structure.
410