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

Input checking for MarkovConsumerType #83

Closed
dclow opened this issue Sep 28, 2016 · 4 comments
Closed

Input checking for MarkovConsumerType #83

dclow opened this issue Sep 28, 2016 · 4 comments

Comments

@dclow
Copy link
Contributor

dclow commented Sep 28, 2016

MarkovConsumerType could use more checking of its inputs. It can give very weird error messages if it receives inputs that are just slightly different than what they should be.

For example, I wasted a lot of time with an infinite horizon version before I figured out that PermGroFac and LivPrb should be lists (of length 1, whose only element is a np.array), but Rfree should just be a numpy array. Also, those arrays should be of shape (N,), where N is the number of Markov states. Using an array of shape (N,1) also produced a very obscure error message

I imagine putting in checks at the beginning to verify that inputs are the right types and shapes could save a lot of people some of the hassle I went through

@mnwhite
Copy link
Contributor

mnwhite commented Sep 28, 2016

That's because LivPrb and PermGroFac are time-varying, so they need to be
lists at the top level (before being input to the solver for one period).

On Tue, Sep 27, 2016 at 8:46 PM, dclow notifications@github.com wrote:

MarkovConsumerType could use more checking of its inputs. It can get very
weird error message if it receives inputs that are just slightly different
than what they should be.

For example, I wasted a lot of time with an infinite horizon version
before I figured out that PermGroFac and LivPrb should be lists (of length
1, whose only element is a np.array), but Rfree should just be a numpy
array. Also, those arrays should be of shape (N,), where N is the number of
Markov states. Using an array of shape (N,1) also produced a very obscure
error message

I imagine putting in checks at the beginning to verify that inputs are the
right types and shapes could save a lot of people some of the hassle I went
through


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#83, or mute the thread
https://github.com/notifications/unsubscribe-auth/ANUQFbeQcVNLEg3EyNOnSgK0ZNL147dSks5qubj2gaJpZM4KIThx
.

@dclow
Copy link
Contributor Author

dclow commented Oct 12, 2016

Just issued a PR to do this. If the PR gets merged (maybe after dealing with issues you find), we can close this issue.

@mnwhite
Copy link
Contributor

mnwhite commented Oct 12, 2016

I will tackle these PRs this weekend. I also plan to prepare a rather
large PR with the new simulation regime.

On Wed, Oct 12, 2016 at 3:11 PM, dclow notifications@github.com wrote:

Just issued a PR to do this. If the PR gets merged (maybe after dealing
with issues you find), we can close this issue.


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#83 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/ANUQFSJ_HyXVscZeFcOtQxHeLLKvU2Oxks5qzTDWgaJpZM4KIThx
.

@mnwhite
Copy link
Contributor

mnwhite commented Jan 9, 2017

The PR that addressed this was merged back in October; closing.

@mnwhite mnwhite closed this as completed Jan 9, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants