Complete NumPy Notes
Prepared for Maruf
Table of Contents
Chapter Topic
1 What is NumPy?
2 Creating Arrays
3 Array Operations
4 Reshape & Flatten
5 Statistics Functions
6 Random Module
7 Real Life Usage
Chapter 1: What is NumPy?
NumPy is a Python library used for numerical computing and array operations.
Example:
import numpy as np
arr = [Link]([1,2,3])
print(arr)
Chapter 2: Creating Arrays
You can create arrays using array(), zeros(), ones(), arange(), linspace().
Example:
import numpy as np
arr = [Link]([1,2,3])
print(arr)
Chapter 3: Array Operations
Addition, subtraction, multiplication, division and broadcasting are supported.
Example:
import numpy as np
arr = [Link]([1,2,3])
print(arr)
Chapter 4: Reshape & Flatten
reshape() changes dimensions and flatten() converts to 1D.
Example:
import numpy as np
arr = [Link]([1,2,3])
print(arr)
Chapter 5: Statistics Functions
mean(), median(), std(), var(), sum(), min(), max()
Example:
import numpy as np
arr = [Link]([1,2,3])
print(arr)
Chapter 6: Random Module
[Link](), randint(), seed() help generate random numbers.
Example:
import numpy as np
arr = [Link]([1,2,3])
print(arr)
Chapter 7: Real Life Usage
Used in Data Science, AI, Machine Learning, and image processing.
Example:
import numpy as np
arr = [Link]([1,2,3])
print(arr)