hakaru-CS4ZP6 / hakaru

A probabilistic programming language
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Error Throwing #33

Closed mkhattab940 closed 6 years ago

mkhattab940 commented 6 years ago

Some distributions are defined in terms of parameters with limitations of their value (e.g. 0 < k < 1). Need a way to throw an error in case a language user calls the distribution with parameter values violating such restrictions.

JacquesCarette commented 6 years ago

Added to my list.

JacquesCarette commented 6 years ago

There seems to be no actual feature.

I think that what you can do, for now, is to have the distribution function return the 0 measure when the parameter is out of bounds. i.e.

reject. measure(real)

for example is the 0 measure over the reals.

JacquesCarette commented 6 years ago

I believe that is sufficient to close the issue?