pmelchior / proxmin

Proximal optimization in pure python
MIT License
113 stars 24 forks source link

Assert statements need to be more verbose #6

Open pmelchior opened 7 years ago

pmelchior commented 7 years ago

As is the asserts, e.g. for number of constraints in GLMM, tell if something isn't right, but they leave the user guessing what has caused the problem.

Instead we should issue, at the very least, the condition that is being tested and why it isn't met. While we're at it we should replace the asserts with proper exceptions so that they cannot be optimized away.