NumPy ¶
NumPy is a Python library used for working with arrays. It provides support for large, multi-dimensional arrays and matrices, along with a large collection of high-level mathematical functions to operate on these arrays. NumPy is a fundamental package for scientific computing with Python and is widely used in the field of data science.
NumPy is particularly well-suited for numerical computations, as it provides an array object that is up to 50x faster than traditional Python lists. The array object in NumPy is called ndarray, and it provides a lot of supporting functions that make working with ndarray very easy. Arrays are very frequently used in data science, where speed and resources are very important.
One of the most important features of NumPy is its ability to perform element-wise operations on arrays. This means that you can perform mathematical operations on entire arrays at once, without having to loop over each element of the array. NumPy also provides support for linear algebra, Fourier transforms, and other advanced mathematical functions, making it a powerful tool for scientific computing.
Key resources:
Note
There are some cells that I am intentionally hiding the code. This is to ensure you are able to pay attention to the key parts. If you ever see data where you cannot see where I got it from, that part is probably hidden.