6 ms·
Numpy is great for dense multidimensional arrays of (edit: fixed precision) floating point numbers. Most problems I face need to deal with richer, more complica
by tavert 11y ago
Numpy is great for dense multidimensional arrays of (edit: fixed precision) floating point numbers. Most problems I face need to deal with richer, more complicated, less uniform data structures than that. Similarly Cython is way better than writing a C extension by hand, but it feels very tacked-on (why are you writing libraries in a different sub-language than you use them from?), what you can do in nogil mode is pretty limited, and the choice of supported compilers is depressingly limited for when you need C++11, inline assembly, Fortran, linking to libraries that build with autotools, etc all to work cross-platform. If absolutely everything in the Python ecosystem were written using Cython then Python would have less of a performance problem, but there's a productivity, distribution, and difficulty barrier there.