def assert_equal(feature, expected, actual):
    # if the feature has the transformation included and the result data is passed, we can compare them
    if feature.data_type == FeatureType.STRING:
        assert all(actual == expected), \
            'Some passed values of "{}" don\'t match the evaluated results'.format(feature.full_name)
    else:
        np.testing.assert_almost_equal(
            actual,
            expected,
            err_msg='Some passed values of "{}" don\'t match the evaluated results'.format(feature.full_name)
        )
Compare expected and actual values for the feature and raise an exception if they are not equal
dataset/ETHPy150Open alex-pirozhenko/sklearn-pmml/sklearn_pmml/convert/utils.py/assert_equal