Skip to content

Allow model to work with J=1 #1057

@jdebacker

Description

@jdebacker

OG-Core allows for a flexible specification of the number of lifetime income groups, J, so long as J>=2.

The issue with J=1 is that there are several np.squeeze() calls throughout the model that, when J=1, cut off the J-dimension and result in broadcasting array errors.

One solution is to use nparray.reshape((..., p.J)) after the squeeze calls. But there may be a more elegant option.

In any case, there are useful cases to allow for a representative agent -- both to reduce compute time for certain tests and in benchmarking functions in the stochastic_income branch.

cc @rickecon @john-p-ryan

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions