Please, use proper tags when post code, traceback, output, etc. This time I have added tags for you.
See BBcode help for more info.
no, you should add
the best would be to add the import statement at the top of the file and the other line as first line in
See BBcode help for more info.
no, you should add
import sys sys.argv = [sys.argv[0], '--dataset', '../datasets/animals']The first element of sys.argv is always the script itself
the best would be to add the import statement at the top of the file and the other line as first line in
if __name__ == '__main__':
block. Note that this may vary little depending how your knn.py looks like.
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs