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

update discrete rv code #398

Open
jstac opened this issue Mar 12, 2018 · 2 comments
Open

update discrete rv code #398

jstac opened this issue Mar 12, 2018 · 2 comments

Comments

@jstac
Copy link
Contributor

jstac commented Mar 12, 2018

Now that #397 is merged, I propose that we remove the DiscreteRV class

https://github.com/QuantEcon/QuantEcon.py/blob/master/quantecon/discrete_rv.py

Not a good idea to have two sets of code for doing the same thing.

The lectures will all need to be updated accordingly, but this is a good thing, since it encourages our transition to exploiting jit compilation more thoroughly.

CC @oyamad @mmcky

@oyamad
Copy link
Member

oyamad commented Mar 13, 2018

My only concern is seeding of the random number generator.

One has to set a seed within a jit function, so

np.random.seed(0)
qe.random.draw(cdf, 10)

does not work.

I am fine with removing DiscreteRV (I never used it in my code), but just pointing out these are not exactly the same; one is for general use and the other for use within a jit function.

@jstac
Copy link
Contributor Author

jstac commented Mar 13, 2018

@oyamad I've looked through the lectures and that won't be an issue.

@mmcky If you agree with deleting then let's coordinate with the changes in the lectures. I'll open a suitable issue there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants