From the course: NumPy Essential Training: 1 Foundations of NumPy

Why should you use NumPy?

- [Instructor] In the late nineties, Python became popular among programmers who mainly worked with vectors and matrices and therefore needed faster vector operations. The drawback of Python is that it's not initially designed for numerical computing. NumPy proved to be a perfect fit for these kinds of situations since it allows users to have their computations completed efficiently. NumPy is the most important package for scientific computing in Python and is the base for many other packages. Even though Python lists are easy to create and manipulate, they don't support vectorized operations. Python doesn't have fixed type elements in lists. And for example, for loops are not very efficient because at every iteration data types need to be checked. In NumPy arrays, this situation doesn't occur as the datatype is fixed and it also supports vectorized operations. NumPy code is cleaner than Python code while it accomplishes the same tasks. There are fewer loops required because operations work directly on a raise and matrices. The advanced mathematical functions make life easier as well. Many popular machine learning and computational packages use some of the NumPys features. And the most important thing is that they use NumPy raise heavily in their methods. Which makes NumPy an essential library for scientific projects. As you can see in the figure, some well-known libraries use NumPys features. Lastly, since NumPy is open source, you get all related advantages, it's free. So you don't have to worry about licenses every time somebody joins your team, or you need a software upgrade. The source code is available for everyone.

Contents