QuantEcon / lecture-python-advanced.myst

Advanced Quantitative Economics with Python

Home Page:https://python-advanced.quantecon.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Use `np.full`

oyamad opened this issue · comments

Thanks @oyamad .

Hi @oyamad and @jstac , next I will

  1. identify the pattern np.ones * alpha through all advanced lectures,
  2. list related lectures and
  3. create a PR to modify this pattern to the np.full version.

The pattern np.ones * alpha appears in the following lectures (call the following list 1):

  • amss
  • amss3
  • arellano
  • calvo
  • rosen_schooling_model
  • smoothing_tax
  • smoothing

Except those above, I also identify the np.ones pattern in the following lectures and do you think we should modify these as well (call the following list 2)?

  • additive_functionals: nx1 = np.ones(nx)
  • amss2: c1, c2 = fsolve(equations, np.ones(2), args=(Φ))
  • discrete_dp: # data = np.ones(L)
  • dyn_stack: βs = np.ones(n)
  • lucas_model: f = np.ones_like(grid) # Initial guess of f
  • opt_tax_recur: tax_seq = SequentialLS(CRRAutility(), g=np.array([0.15]), π=np.ones((1, 1)))