Code Duplication    Length = 4-4 lines in 2 locations

pyclustering/utils/__init__.py 2 locations

@@ 677-680 (lines=4) @@
674
        for t in range(time_stop_simulation, 0, -1):
675
            if ( (dynamic[t][index_dyn] > 0) and (active_state is False) ):
676
                desc[0] = t;
677
                active_state = True;
678
            elif ( (dynamic[t][index_dyn] < 0) and (active_state is True) ):
679
                desc[1] = t;
680
                active_state = False;
681
                
682
                break;
683
        
@@ 656-659 (lines=4) @@
653
            continue;
654
        
655
        time_stop_simulation = len(dynamic) - 1;
656
        active_state = False;
657
        
658
        if (dynamic[time_stop_simulation][index_dyn] > threshold):
659
            active_state = True;
660
            
661
        # if active state is detected, it means we don't have whole oscillatory period for the considered oscillator, should be skipped.
662
        if (active_state is True):