Use more assert
for checking the variable properties.
#31920
lionelkusch
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
By looking at the code, I see that most of the checks of the variable are based on the next schema:
For example,
scikit-learn/sklearn/neighbors/_nca.py
Lines 248 to 292 in 24844a0
I am wondering why the assertion is not used in this case.
The advantage of assertion is that there can be deactivate it by option "-O" of python and it can increase the speed of execution of a program, especially in the case of a pipeline.
Beta Was this translation helpful? Give feedback.
All reactions