Open riastradh-probcomp opened 8 years ago
Sounds good to me. This is an acceptable resolution to #534.
Whoops. I thought there was a related issue but overlooked #534 when I went looking for it a few minutes ago.
Addendum: Define expm1 in utils.py too.
Proposal: In utils.py, rename
Import these unqualified and use them consistently, instead of
math.*
ornumpy.*
, wherever a single point is required. Continue to usenumpy.*
consistently where vectorization may be needed.Rationale:
math.*
raise exceptions on overflow by default, rather than returning infinities, and my impression is that I've encountered more bugs because of that than because of the converse. (This reason is subject to all sorts of cognitive biases.)numpy.*
have considerable overhead vsmath.*
for the single-point case.