OpenSourceEconomics / lcm

Solution and simulation of life cycle models in Python with GPU acceleration.
Apache License 2.0
16 stars 1 forks source link

ENH: Throw an error when utility is not defined on a grid value #55

Open timmens opened 8 months ago

timmens commented 8 months ago

Current behavior

If the utility is evaluated on a grid value that is undefined we either introduce NAs, which lead to an error, or we introduce negative infinity, which does not result in an error.

Expected behavior

In any of the above two cases, throw an informative error, so that either the calculated value function contains only proper numbers or an error is thrown.