econ-ark / HARK

Heterogenous Agents Resources & toolKit
Apache License 2.0
328 stars 197 forks source link

replace tiling operations for creating grids with np.meshgrid #934

Open sbenthall opened 3 years ago

sbenthall commented 3 years ago

see discussion in #625 https://github.com/econ-ark/HARK/issues/625#issuecomment-768418303

np.meshgrid can replace and simplify some of the complex grid building code currently done with np.tiling

mnwhite commented 1 month ago

We do this in some places and not others. The calls to np.tile can also be reduced with numpy shape-casting (or whatever it's called), which I didn't understand well when writing the solvers initially.