4 ms·
There are FFT libraries written in Cython, the superset of Python that compiles to C/C++. Just because the Cpython runtime might be too slow for this type of ta
by gcthomas 7y ago
There are FFT libraries written in Cython, the superset of Python that compiles to C/C++. Just because the Cpython runtime might be too slow for this type of task doesn't mean the language is.
And why would anyone write FFT code anyway? Robust implementations exist already - see netlib.org for algorithms implemented in C, C++ and Fortran. SciPy uses these and wraps them for use in Python, with newer code worn in Cython.
So yes, FTT applications can be, and routinely are, written in Python if that is what you are most familiar with, as is the case for many natural scientists and data scientists.
- FpUser 7y agoAnd why would anyone write FFT code anyway? Robust implementations exist already The FFT was just an example, you can substitute it with any SolveTheWorldHunger computationally extensive algo
- gcthomas 7y agoAnd you'd find that Python is a go-to language for people writing such algorithms. The black hole image which was in the news was produced from massively complex data sets from across the world. Would you like to guess which programming language was used? Python looping is often the slowest part of data analysis algorithms, but no-one uses Python loops is these cases. Vectorising this sort of analysis using fast extensions makes Python perfectly speedy enough for actual scientists.
- FpUser 7y ago"And you'd find that Python is a go-to language for people writing such algorithms." If it works for them, sure. Did not work for me.