QuantEcon.py icon indicating copy to clipboard operation
QuantEcon.py copied to clipboard

Unify QuantEcon.py and QuantEcon.jl APIs?

Open Smit-create opened this issue 2 years ago • 6 comments
trafficstars

One of the APIs that differ in julia and python versions is: tauchen. Julia version is: Doc1 Python version is: Doc2

We can try to unify such APIs that differ in julia and python(like name of function arguments, position of parameters, etc.) which will help the users in migrating from one language to the other easily.

Some of the APIs are:

  • [x] tauchen and rouwenhorst (#664 )
  • [ ] markov_chain_object.P vs markov_chain_object.p

Smit-create avatar Dec 06 '22 06:12 Smit-create

Yes, that would be great @Smit-create . The tauchen one has always bothered me. This one might need unifying as well:

http://quantecon.github.io/QuantEcon.jl/latest/api/QuantEcon.html#QuantEcon.rouwenhorst

The only issue is that these are breaking changes, so we would need to coordinate changes on the lectures and any other downstream code (e.g., the DP textbook).

jstac avatar Dec 06 '22 07:12 jstac

See also #363.

oyamad avatar Dec 06 '22 07:12 oyamad

Thanks, @jstac and @oyamad. I have opened a PR to fix the same. Once that is merged in the master, I will then fix the lectures/dp_textbook code.

Smit-create avatar Dec 06 '22 08:12 Smit-create

Thanks @Smit-create . The relevant PR is #664 . Is the idea to shift all Python to Julia equivalent?

@mmcky We will have to be careful with this issue since a number of the QE lectures use tauchen and perhaps rouwenhorst.

jstac avatar Dec 06 '22 08:12 jstac

Another difference: Python: markov_chain_object.P Julia: markov_chain_object.p

Smit-create avatar Dec 13 '22 12:12 Smit-create

Can you make the UserWarning to appear only once per session?

marcdelabarrera avatar Apr 13 '23 19:04 marcdelabarrera