<commit_before>def test_custom_dr():

    from dolo import yaml_import
    import numpy as np
    from dolo.numeric.decision_rule import CustomDR

    model = yaml_import('examples/models/rbc.yaml')

    values = {
        'n': '0.33 + z*0.01',
        'i': 'delta*k-0.07*(k-9.35497829)'
    }

    edr = CustomDR(values, model)

    m0, s0 = model.calibration['exogenous','controls']

    edr(m0, s0)

    sim = simulate(model, edr, s0=np.array([0.0, 8.0]))

    time_iteration(model, initial_guess=edr)<commit_msg>FIX: missing imports in tests.<commit_after>def test_custom_dr():

    from dolo import yaml_import, simulate, time_iteration
    import numpy as np
    from dolo.numeric.decision_rule import CustomDR

    model = yaml_import('examples/models/rbc.yaml')

    values = {
        'n': '0.33 + z*0.01',
        'i': 'delta*k-0.07*(k-9.35497829)'
    }

    edr = CustomDR(values, model)

    m0, s0 = model.calibration['exogenous','controls']

    edr(m0, s0)

    sim = simulate(model, edr, s0=np.array([0.0, 8.0]))

    time_iteration(model, initial_guess=edr)
{'fraction_non_alphanumeric': 0.1469767441860465, 'fraction_numerical': 0.05023255813953489, 'mean_word_length': 3.1068702290076335, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4092244', 'n_tokens_mistral': 442, 'n_tokens_neox': 395, 'n_words': 79}