"""assert functions from numpy and pandas testing

"""
from statsmodels.compat.pandas import testing as pdt

import re

import numpy.testing as npt
import pandas

# for pandas version check
def strip_rc(version):
    return re.sub(r"rc\d+$", "", version)


# local copies, all unchanged
from numpy.testing import (assert_allclose, assert_almost_equal,
     assert_approx_equal, assert_array_almost_equal,
     assert_array_almost_equal_nulp, assert_array_equal, assert_array_less,
     assert_array_max_ulp, assert_raises, assert_string_equal, assert_warns)


# adjusted functions

def assert_equal(actual, desired, err_msg='', verbose=True, **kwds):
    if isinstance(desired, pandas.Index):
        pdt.assert_index_equal(actual, desired)
    elif isinstance(desired, pandas.Series):
        pdt.assert_series_equal(actual, desired, **kwds)
    elif isinstance(desired, pandas.DataFrame):
        pdt.assert_frame_equal(actual, desired, **kwds)
    else:
        npt.assert_equal(actual, desired, err_msg='', verbose=True)

@@ -160,101 +160,8 @@
 as%0A%0A
-# for pandas version check%0Adef strip_rc(version):%0A    return re.sub(r%22rc%5Cd+$%22, %22%22, version)%0A%0A
 %0A# l

remove unused strip_rc; closes #5126