Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I did some SciPy work in computer vision applications, and it was both a blessing and a curse. About 80% of the code could be reduced into matrix operations, which provided the 'embarrassing' moments that the article mentions. However, I'd hit something like Hysteresis Thresholding in the Canny Edge Detector, which traces through the image looking for faint edges, and spend a day figuring out how to write a Python extension against the Numpy API. This was necessary, because any code that iterated over 1000 x 1000 matrices in Python that I wrote took well over 10 seconds, instead of the < 100 milliseconds it should take.

As a nublet, I probably didn't end up saving much time over C++, but I could see that in the right hands, this tool would be a lifesaver



scipy.weave solved a lot of these types of problems for me. It allows you to place inline c++ (with access to the blitz library) it does the trick for those cases where expressing something as a matrix operation would be wasteful.




Consider applying for YC's Winter 2027 batch! Applications are open till November 2.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: