

def isdatasimilar(data1, data2, verb=False, atol=ATOL, rtol=RTOL):
    '\n    Check that two sets of NMR data are equal within a tolerance.\n\n    Parameters\n    ----------\n    data1 : ndarray\n        First array of NMR data\n    data2 : ndarray\n        Second array of NMR data\n    verb : bool, optional\n        Set True for verbose reporting.\n    atol : float, optional\n        The absolute tolerent parameter to pass to numpy.allclose.\n    rtol : float, optional\n        The relative tolenance parameter to pass to numpy.allclose.\n\n    Returns\n    -------\n    r1 : bool\n        True is data1 and data2 are similar, False if they differ.\n\n    '
    r = True
    if (data1.dtype != data2.dtype):
        r = False
        if verb:
            print('Dtypes do not match:', data1.dtype, data2.dtype)
    if (data1.shape != data2.shape):
        r = False
        if verb:
            print('Shapes do not match:', data1.shape, data2.shape)
    if (np.allclose(data1, data2, rtol=rtol, atol=atol) is False):
        r = False
        if verb:
            print('Data does not match')
    return r

dataset/ETHPy150Open jjhelmus/nmrglue/nmrglue/util/misc.py isdatasimilar/original