LSSTDESC / qp

Quantile Parametrization for probability distribution functions module

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Truncnorm translation layer

aimalz opened this issue · comments

https://docs.scipy.org/doc/scipy/reference/generated/scipy.stats.truncnorm.html is set up counterintuitively such that the limits the user provides to instantiate the frozen rv_continuous object are scaled to the standard normal rather than the physical dimension over which the distribution is defined. This is necessary for the way vectorization is implemented for all the rv_continuous methods, but it causes problems if users provide those arguments in the physical dimensions rather than converting to the standard normal. I wonder if we can wrap something around it that enables users to create the object with physical limits and have the conversion to internal units, knowing that the actual use case will always be the one that can't take advantage of vectorization anyway so might as well be intuitive to access.