Describe the bug
Normal distribution requires sigma>0, but that is not enforced and does not catch unexpected behaviours (i.e. negative sigma is accepted and then just squared internally for variance computations). This is relevant if the sigma is not defined a priori but obtained algorithmically, such as in hierarchical approaches.
To Reproduce
Normal(0, -1)
Expected behavior
An error or warning should be thrown.
Additional context
This is relatively minor. Feel free to delete if the user is the one expected to check for positivity. The documentation of the class already specifies it. Other distributions could benefit for the same treatment.
Describe the bug
Normal distribution requires sigma>0, but that is not enforced and does not catch unexpected behaviours (i.e. negative sigma is accepted and then just squared internally for variance computations). This is relevant if the sigma is not defined a priori but obtained algorithmically, such as in hierarchical approaches.
To Reproduce
Normal(0, -1)
Expected behavior
An error or warning should be thrown.
Additional context
This is relatively minor. Feel free to delete if the user is the one expected to check for positivity. The documentation of the class already specifies it. Other distributions could benefit for the same treatment.