6. NumPy Arrays#
NumPy, or Numerical Python, is the foundation for Pythonic data science, machine learning, and scientific libraries like pandas, scikit-learn, and TensorFlow. Learning NumPy is to understand the basics of how these other tools work. NumPy (or Numpy) is basically a linear algebra library for Python. As the numerical library for Python, NumPy is important for data science because almost all the libraries in the Python data science ecosystem rely on NumPy as one of the building blocks.
NumPy provides built-in tools for math, statistics, and linear algebra. NumPy makes numerical computing in Python fast, efficient, and powerful.
As an introduction, we need to learn the following about NumPy with an emphasis on ndarrays:
Basics of NumPy arrays
1.1. Attributes
1.2. Access
1.3. Reshape
1.4. Concatenation and splittingNumPy array operations
2.1. N-Dimensional arrays
2.2. Broadcasting
2.3. Vectorization
2.4. Linear algebraNumPy array computation
3.1. Aggregations
3.2. Broadcasting
3.3. Comparison
3.4. Fancy indexing
3.5. Sorting