EconForge / dolo.py

Economic modelling in python
BSD 2-Clause "Simplified" License
98 stars 72 forks source link

TypeError: DiscretizedIIDProcess() takes no arguments #209

Closed sbenthall closed 3 years ago

sbenthall commented 4 years ago

Here, the DiscretizedIIDProcess constructor is called with two arguments: https://github.com/EconForge/dolo.py/blob/3c73f4cd7838a4913dbdf7bbd559e80570b0a5e8/dolo/numeric/processes.py#L121

However, that class takes no arguments in its constructor?

I get this error in a call to find_steady_state(model) in dolark which winds up with this message:

TypeError: DiscretizedIIDProcess() takes no arguments

If necessary I can try to narrow down the conditions for the error.

albop commented 4 years ago

Yes, I think this definition of DiscretizedIIDProcess in processes.py is obsolete and should be removed. It should be replaced by FiniteDistribution from distribution.py.

sbenthall commented 3 years ago

Any update on this issue?

albop commented 3 years ago

Have you tried using FiniteDistribution instead of DiscretizedIIDProcess ?

sbenthall commented 3 years ago

Ah, are you saying you would like this as a PR?

albop commented 3 years ago

Oh, if you could do a PR, that would be great. You just need to remove DiscretizedIIDProcess. But if you are importing it from outside, just import FiniteDistribution instead of DiscretizedIIDProcess.

albop commented 3 years ago

Here is the hierarchy for IID distributions.

classes_distributions

albop commented 3 years ago

Problem has actually been solved a while ago. Line 121 of processes.py, there is no call to DiscretizedIIDProcess anymore.