COVID-IWG / epimargin

networked, stochastic SIRD epidemiological model with Bayesian parameter estimation and policy scenario comparison tools
https://www.adaptivecontrol.org/
MIT License
9 stars 5 forks source link

Setting properties that do not exists #125

Closed dilawar closed 3 years ago

dilawar commented 3 years ago

https://github.com/COVID-IWG/epimargin/blob/7170f5f25a7c39f6b67c061f1a807ecb378b81b4/epimargin/plots.py#L547

I don't understand it. mypy is also having trouble.

Effectively, we are assigning something to a Callable? Is it the expected behavior? Then how does assigning horizontal and vertical work here? I am not getting it.

satejsoman commented 3 years ago

Hi @dilawar - this was included as a purely cosmetic convenience function for data scientists coming from R. There are similar cases in the Python standard library, e.g. itertools.chain.from_iterable(). I'm happy to fix some of the typing/linting errors in epimargin.policy and other files you've highlighted, but this issue strikes me as overly dogmatic adherence to mypy.