-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Arellano_solutions migration to matplotlib 1.4.3 in python 3.4 #190
Comments
@finmod Thank you for the report. This seems to be a bug in This line should have been To double check, I have to set up a Python 3 environment, and I will then fix this tomorrow. |
Maybe |
None of the two patches. TypeError Traceback (most recent call last) C:\Users\Denis\Anaconda3\lib\site-packages\quantecon\markov\core.py in simulate(self, ts_length, init, num_reps, random_state)
--> 352 k = len(init) # init is an array
TypeError: object of type 'numpy.int64' has no len() During handling of the above exception, another exception occurred: NameError Traceback (most recent call last) in ()
----> 2 y_vec, B_vec, q_vec, default_vec = ae.simulate(T)
C:\Users\Denis\Anaconda3\lib\site-packages\quantecon\models\arellano_vfi.py in simulate(self, T, y_init, B_init)
--> 166 y_sim_indices = mc.simulate(T, init=y_init)
C:\Users\Denis\Anaconda3\lib\site-packages\quantecon\markov\core.py in simulate(self, ts_length, init, num_reps, random_state)
--> 365 elif isinstance(init, numbers.Integral):
NameError: name 'numbers' is not defined From: Daisuke Oyama [mailto:[email protected]] Maybe elif isinstance(init, numbers.Integral): is enough (numpy/numpy#4547 numpy/numpy#4547 ). — |
Thanks @finmod, the |
Ok. Spot on by inserting import numbers in core.py and also in the arellano notebook. Thanks Denis Richard
From: Daisuke Oyama [mailto:[email protected]] Thanks @finmod https://github.com/finmod , the numbers module has to be imported by import numbers. — |
The following error appears in arellano_solutions in the plotting the last three time series.
TypeError Traceback (most recent call last)
C:\Users\Denis\Anaconda3\lib\site-packages\quantecon\markov\core.py in simulate(self, ts_length, init, num_reps, random_state)
351 try:
--> 352 k = len(init) # init is an array
353 dim = 2
TypeError: object of type 'numpy.int64' has no len()
During handling of the above exception, another exception occurred:
ValueError Traceback (most recent call last)
in ()
1 T = 250
----> 2 y_vec, B_vec, q_vec, default_vec = ae.simulate(T)
3
4 # Pick up default start and end dates
5 start_end_pairs = []
C:\Users\Denis\Anaconda3\lib\site-packages\quantecon\models\arellano_vfi.py in simulate(self, T, y_init, B_init)
164 mc = qe.markov.MarkovChain(self.Py)
165
--> 166 y_sim_indices = mc.simulate(T, init=y_init)
167 B_sim_indices = np.empty(T, dtype=np.int64)
168 B_sim_indices[0] = B_init
C:\Users\Denis\Anaconda3\lib\site-packages\quantecon\markov\core.py in simulate(self, ts_length, init, num_reps, random_state)
367 else:
368 raise ValueError(
--> 369 'init must be int, array_like of ints, or None'
370 )
371
ValueError: init must be int, array_like of ints, or None
The text was updated successfully, but these errors were encountered: