(a, b, type_)
checks if arrays have nans in same places and if not-nan elements
    are equal
checks if arrays have nans in same places and if not-nan elements
    are equal
checks if arrays have nans in same places and if not - nan elements are equal
def arrays_equal(a, b, type_):
    """
    checks if arrays have nans in same places and if not-nan elements
    are equal
    """
    if a is None and b is None:
        return True
    if a is None or b is None:
        return False
    if type_ is not StringVariable:
        nana = np.isnan(a)
        nanb = np.isnan(b)
        return np.all(nana == nanb) and np.all(a[~nana] == b[~nanb])
    else:
        return np.all(a == b)
def arrays_equal ( a , b , type_ ) : if a is None and b is None : return True if a is None or b is None : return False if type_ is not StringVariable : nana = np . isnan ( a ) nanb = np . isnan ( b ) return np . all ( nana == nanb ) and np . all ( a [ ~ nana ] == b [ ~ nanb ] ) else : return np . all ( a == b )