Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUG: Make order of "states" in model specification more flexible #40

Open
ChristianZimpelmann opened this issue Oct 7, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@ChristianZimpelmann
Copy link
Member

If in the model-specification dictionary a continuous state variable is followed by a discrete state variable (see below), the following error is shown:

ValueError: Interpolation axes need to be the last entries in axis_order.

Code Sample, a copy-pastable example

    "states": {
        "wealth": {
            "grid_type": "linspace",
            "start": 100,
            "stop": 10_000,
            "n_points": 2000,
        },
        "age_youngest_child": {"options": list(range(19))},
    },

If the order is reversed, it works fine.

Expected Output

  • At some point lcm should probably reorder the state variable definitions internally such that no error is thrown
  • Alternatively, at least the error message should be improved

Bug does not have a high priority (should we add a label to indicate that?)

@ChristianZimpelmann ChristianZimpelmann added the bug Something isn't working label Oct 7, 2023
@janosg
Copy link
Member

janosg commented Oct 8, 2023

Good that you made a bug report. This should have worked already and should be easy to fix if not.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants