Β
Hey there!
I want to share my journey of learning NumPy in just 10 days. Every day, I spent 30 to 45 minutes learning. I followed a simple roadmap and practiced step by step. I wrote everything down in a Jupyter Notebook. You can find all my code here:
π GitHub Repository: Β
Β FahimMuntashir/zero-to-ds - NumPy Folder
Β What is NumPy? Β
- NumPy is a Python library that makes working with numbers and arrays super easy and fast. If you're learning data science, machine learning, or even basic math with Python, youβll love NumPy!
π My 10-Day NumPy Learning Plan
π Day 1: Introduction to NumPy & Basics
- β
Install NumPy (
pip install numpy) - β Import and check version
- β
Learn about
ndarray(NumPy arrays) - β
Create arrays using
array(),zeros(),ones(),full(),arange(),linspace() - β
Check data types using
.dtype - β
Understand
.shape,.size,.ndim β Basic indexing and slicing
π Practice: Create 1D, 2D, and 3D arrays and try slicing them.
π Day 2: Array Operations & Broadcasting
- β Create arrays with random numbers
- β Learn NumPy data types
- β
Perform arithmetic operations:
+,-,*,/,** - β
Use universal functions:
np.add(),np.subtract(), etc. - β
Try aggregation functions:
np.sum(),np.mean(),np.std(),np.sin(),np.cos() - β Element-wise operations
- β Learn broadcasting rules
π Practice: Add scalars to arrays and try element-wise multiplication.
π Day 3: Shape, Reshaping & Broadcasting
- β Understand array shapes
- β
Use
.reshape()to convert 1D to 2D, or vice versa - β Learn how broadcasting works with different shapes
π Day 4: Indexing and Slicing
- β Indexing with boolean masks and integers
- β Slice 1D, 2D, and 3D arrays
- β
Use
np.where()for condition-based selection - β
Flatten arrays with
.ravel()and.flatten() - β
Transpose arrays using
.T - β
Stack arrays with
np.hstack(),np.vstack(),np.concatenate()
π Day 5: Iterating, Copy vs Views
- β
Iterate through arrays using
np.nditer() - β
Get index and data using
np.ndenumerate() - β Understand the difference between copies and views of arrays
π Day 6: Joining & Splitting Arrays
- β
Join arrays using
concatenate(),stack(),hstack(),vstack(),dstack() - β
Split arrays using
split(),array_split(),vsplit(),dsplit()
π Day 7: Search, Sort, Filter, Arithmetic
- β
Search with
np.where() - β
Use
searchsorted()to find insert locations - β
Sort arrays with
np.sort() - β Filter arrays using conditions
- β
Try extra functions:
np.shuffle(),np.unique(),np.resize(),np.flatten(),np.ravel()
π οΈ Day 8 to Day 10: Practice Time
After learning the basics in 7 days, I spent the last 3 days just practicing! Practice helped me become more confident with NumPy.
Here are two amazing resources I used:
If you want to start your data science journey, I think NumPy is a great first step. You donβt need to be a pro to begin. Just take small steps like I did.
Thanks for reading! π Β
Let me know if you try this challenge too! Β
Β
Leave a comment
Your email address will not be published. Required fields are marked *