In this chapter, we learned how to manipulate NumPy arrays and how to write fast mathematical expressions using array broadcasting. This knowledge will help you to design better programs while obtaining massive performance gains. We also introduced the
numexpr library to further increase the speed of our calculations with a minimal amount of effort.
NumPy works very well when handling independent sets of inputs, but it's not suitable when the expressions grow complex and cannot be split in element-wise operations. In such cases, we can leverage Python capabilities as a glue language by interfacing it with C using the Cython package.