nappy/contrib/aircraft/scanFAAM.py
def findMissing(var, step, missingValuesToUse):
    """
    Returns the (start, end) tuple for a given variable where
    they are indices of an array where missing values end and begin.
    """
    start=None
    end=None
    i0=0    
    sh=var.shape
    iend=sh[0]-1

    print var.id, step
    for miss in missingValuesToUse:
        for i in range(i0, iend, step):
            if var[i][0]==miss:
                start=i
                break
            
        for e in range(iend, i0, -step):
            if var[e][0]==miss:
                end=e
                break
            
    return (start, end)

    Returns the (start, end) tuple for a given variable where
    they are indices of an array where missing values end and begin.
    
Returns the (start, end) tuple for a given variable where
they are indices of an array where missing values end and begin.
Returns the ( start end ) tuple for a given variable where they are indices of an array where missing values end and begin .
def findMissing(var, step, missingValuesToUse):
    start=None
    end=None
    i0=0    
    sh=var.shape
    iend=sh[0]-1
    print var.id, step
    for miss in missingValuesToUse:
        for i in range(i0, iend, step):
            if var[i][0]==miss:
                start=i
                break
        for e in range(iend, i0, -step):
            if var[e][0]==miss:
                end=e
                break
    return (start, end)
def findMissing ( var , step , missingValuesToUse ) : start = None end = None i0 = 0 sh = var . shape iend = sh [ 0 ] - 1 print var . id , step for miss in missingValuesToUse : for i in range ( i0 , iend , step ) : if var [ i ] [ 0 ] == miss : start = i break for e in range ( iend , i0 , - step ) : if var [ e ] [ 0 ] == miss : end = e break return ( start , end )
Returns the (start, end) tuple for a given variable where
they are indices of an array where missing values end and begin.
Returns the ( start end ) tuple for a given variable where they are indices of an array where missing values end and begin .
"""
    Returns the (start, end) tuple for a given variable where
    they are indices of an array where missing values end and begin.
    """
var
step
missingValuesToUse