def Sn(x,y):
    """ Calculate Sn

    Parameters:
    -----------
        'x' (numpy array): predictions
        'y' (numpy array): observations
    
    Returns:
    --------
        'Sn'
    """    
    if float(sum(x+y==2) + sum(x-y==-1))!=0:
    
        return float(sum(x+y==2)) / float(sum(x+y==2) + sum(x-y == -1))
    
    else:
        
        return 0.