Saturday 2 p.m.–2:30 p.m.

Effective numerical computation in Numpy and Scipy (en)

Kimikazu Kato

Audience level:
Science / 科学


This talk explores case studies of effective usage of Numpy/Scipy and shows that the computational speed sometimes improves drastically with the appropriate derivation of formulas and performance-conscious implementation. I especially focus on scipy.sparse, the module for sparse matrices, which is often useful in the areas of machine learning and natural language processing.


Although Python is considered to be a good tool for numerical computation, naive implementations can be slow and give beginners a negative impression about Python performance. With appropriate usage of Numpy/Scipy, and Python friendly derivation of formulas, computation speed can be improved dramatically. This talk covers issues discussed in [1] as well as practical case-studies involving algorithms typical in machine learning. I especially emphasize the convenience of scipy.sparse, the module for sparse matrices. To extract a good performance from scipy.sparse, knowledge of internal data structures and mathematical skill are necessary. This talk tries to be beginner friendly but requires familiarity with linear algebra. [1] Gabriete Lanaro, "Python High Performance Programming." Packt Publishing, 2013.