DeepRegNet / DeepReg

Medical image registration using deep learning
Apache License 2.0
568 stars 77 forks source link

Raise error instead of using assert #676

Closed mathpluscode closed 3 years ago

mathpluscode commented 3 years ago

Subject of the issue

As described in https://dbader.org/blog/python-assert-tutorial,

Asserts can be turned off globally in the Python interpreter. Don’t rely on assert expressions to be executed for data validation or data processing.

Therefore, it is recommended to raise errors instead of using asserts in the code. For tests, it's fine.

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.