A complete, structured practice repository covering NumPy from basics to advanced operations — built as part of a 3-year hands-on journey in Machine Learning and Data Science.
This repository contains well-organized Python scripts covering all core NumPy concepts. Each file is focused on one topic, numbered in learning order, and written with clear comments for easy understanding.
NumPy is the backbone of all scientific computing in Python — mastering it is the first step toward Machine Learning, Deep Learning, and Data Science.
numpy-fundamentals/
│
├── basics/
│ ├── 01_array_creation.py # Creating arrays: ones, zeros, eye, linspace, arange, random
│ ├── 02_arithmetic_operations.py # Add, subtract, multiply, divide on arrays
│ ├── 03_arithmetic_functions.py # NumPy math functions: sin, cos, sqrt, log, exp
│ ├── 04_shape_reshape.py # Shape, reshape, flatten, transpose
│ ├── 05_indexing.py # Array indexing — 1D and 2D
│ ├── 06_slicing.py # Array slicing — 1D and 2D
│ ├── 07_type_casting.py # dtype, astype, type conversion
│ ├── 08_iteration.py # Iterating arrays with nditer
│ ├── 09_copy_vs_view.py # Difference between copy and view
│ ├── 10_join_split.py # Concatenate, stack, split arrays
│ ├── 11_numpy_functions.py # Statistical functions: sum, mean, min, max, std
│ ├── 12_matrix_operations.py # Matrix creation, multiplication, determinant
│ └── 13_insert_delete.py # Insert, delete, append elements
│
├── .gitignore
├── requirements.txt
└── README.md
| # | Topic | Key Concepts |
|---|---|---|
| 01 | Array Creation | ones, zeros, eye, linspace, arange, random |
| 02 | Arithmetic Operations | add, subtract, multiply, divide, mod, power |
| 03 | Arithmetic Functions | Math functions on arrays |
| 04 | Shape & Reshape | shape, reshape, flatten, ravel, transpose |
| 05 | Indexing | 1D/2D indexing, fancy indexing |
| 06 | Slicing | 1D/2D slicing with step |
| 07 | Type Casting | dtype, astype, type conversion |
| 08 | Iteration | nditer, ndenumerate |
| 09 | Copy vs View | Memory behavior, deep vs shallow copy |
| 10 | Join & Split | concatenate, stack, hstack, vstack, split |
| 11 | NumPy Functions | sum, mean, min, max, std, var, sort |
| 12 | Matrix Operations | dot product, matrix multiply, determinant |
| 13 | Insert & Delete | insert, delete, append operations |
1. Clone the repository:
git clone https://github.com/Arifkhan171/numpy-fundamentals.git
cd numpy-fundamentals2. Install dependencies:
pip install -r requirements.txt3. Run any script:
python basics/01_array_creation.pyArif Khan Final Year CS Student | University of Loralai | ML • Deep Learning • Agentic AI
⭐ Part of a complete Data Science & AI portfolio — from NumPy basics to Agentic AI systems.