NumPy Examples - Consolidated & DeduplicatedΒΆ
This directory contains a comprehensive collection of NumPy tutorials, exercises, and examples, consolidated from multiple GitHub repositories and deduplicated for clarity.
π Directory StructureΒΆ
01-basics/ΒΆ
Beginner-friendly tutorials covering fundamental NumPy concepts
Files from python-bootcamp-numpy:
01-NumPy Arrays.ipynb- Array creation and basic operations01-Python Crash Course.ipynb- Python fundamentals02-Numpy Indexing and Selection.ipynb- Indexing, slicing, and selection02-Python Crash Course Exercises.ipynb- Python practice exercises03-Numpy Operations.ipynb- Mathematical operations and broadcasting
Files from NumPy tutorial:
NumPy Tutorial.ipynb- Comprehensive basics tutorial
Topics Covered:
Array creation (from lists, built-in methods)
Array attributes (shape, dtype, size, ndim)
Indexing and slicing
Basic operations (arithmetic, broadcasting)
Array manipulation
Recommended Order: Start with 01-NumPy Arrays.ipynb, then NumPy Tutorial.ipynb
02-intermediate/ΒΆ
Intermediate topics for deepening NumPy knowledge
Files from Intro_To_Numpy:
intro.ipynb- Introduction to NumPy conceptsintro2.ipynb- Additional introductory materialcopyview.ipynb- Understanding copy vs viewfiltering.ipynb- Boolean indexing and filteringfun.ipynb- Fun NumPy tricks and patternsit.ipynb- Array iteration techniquess.ipynb- Stacking and splitting arrayssearcher.ipynb- Searching in arraysshaper.ipynb- Reshaping and transposingslice.ipynb- Advanced slicing techniquesslice2d.ipynb- 2D array slicing
Topics Covered:
Memory management (copy vs view)
Boolean indexing and fancy indexing
Array searching and filtering
Reshaping, stacking, splitting
Advanced iteration patterns
Note: numpy_youtube directory was a duplicate of this content and has been excluded.
03-exercises/ΒΆ
Practice exercises to test and improve your NumPy skills
From numpy-100:ΒΆ
100_Numpy_exercises.ipynb- 100 curated NumPy exercises
Description: A collection of 100 exercises from easy (β ββ) to hard (β β β ), covering all aspects of NumPy. Great for systematic practice.
From numpy_exercises:ΒΆ
Topic-based exercise sets with solutions:
1_Array_creation_routines.ipynb/1_Array_creation_routines_Solution.ipynb2_Array_manipulation_routines.ipynb/2_Array_manipulation_routines_Solution.ipynb3_Binary_operations.ipynb/3_Binary_operations_Solution.ipynb4_String_operations.ipynb/4_String_operations_Solution.ipynb5_Mathematical_functions.ipynb/5_Mathematical_functions_Solutions.ipynb6_Arithmetic_operations.ipynb/6_Arithmetic_operations_Solutions.ipynb7_Statistics.ipynb/7_Statistics_Solutions.ipynb8_Linear_Algebra.ipynb/8_Linear_Algebra_Solutions.ipynb9_Sorting_and_searching.ipynb/9_Sorting_and_searching_Solutions.ipynb10_Random_sampling.ipynb/10_Random_sampling_Solutions.ipynb11_Set_routines.ipynb/11_Set_routines_Solutions.ipynb
Recommended Approach:
Start with
100_Numpy_exercises.ipynbfor breadthUse topic-based exercises for depth in specific areas
04-advanced/ΒΆ
Advanced tutorials and real-world applications
numpy-tutorials/ΒΆ
Advanced tutorials from the official NumPy tutorials repository:
Markdown Tutorials:
mooreslaw-tutorial.md- Data analysis with Mooreβs Lawpairing.md- Pairing algorithmssave-load-arrays.md- Saving and loading NumPy arraystutorial-air-quality-analysis.md- Real-world data analysistutorial-deep-learning-on-mnist.md- Deep learning with NumPytutorial-deep-reinforcement-learning-with-pong-from-pixels.md- RL implementationtutorial-ma.md- Moving averagestutorial-nlp-from-scratch.md- NLP fundamentalstutorial-plotting-fractals.md- Fractal generationtutorial-static_equilibrium.md- Physics simulationtutorial-style-guide.md- NumPy coding best practices
Data Files:
air-quality-data.csv- Air quality datasettransistor_data.csv- Transistor data for Mooreβs Law
Topics Covered:
Real-world data analysis
Scientific computing (physics, engineering)
Deep learning from scratch
Reinforcement learning
NLP fundamentals
Data visualization
Performance optimization
05-ml-applications/ΒΆ
Machine learning algorithms implemented from scratch with NumPy
numpy-ml/ΒΆ
A complete library of ML algorithms implemented in pure NumPy.
Repository: https://github.com/ddbourgin/numpy-ml
Contents:
Neural networks (MLP, CNNs, RNNs, LSTMs, attention mechanisms)
Reinforcement learning (DQN, A3C, DDPG)
Decision trees and ensemble methods
Linear models (regression, classification)
Gaussian processes
Hidden Markov Models
Bayesian models
Preprocessing utilities
Use Cases:
Understanding ML algorithms at a low level
Educational implementations
Reference for algorithm details
Building custom ML pipelines
Note: This is a complete library. See its README.md for detailed documentation.
π― Learning PathΒΆ
Beginner (0-2 weeks)ΒΆ
Start with
01-basics/01-NumPy Arrays.ipynbWork through
01-basics/NumPy Tutorial.ipynbPractice with first 30 exercises in
03-exercises/100_Numpy_exercises.ipynb
Intermediate (2-6 weeks)ΒΆ
Complete all notebooks in
02-intermediate/Finish remaining exercises in
03-exercises/100_Numpy_exercises.ipynbWork through topic-based exercises in
03-exercises/(with solutions)
Advanced (6+ weeks)ΒΆ
Study tutorials in
04-advanced/numpy-tutorials/Implement projects from the tutorials
Explore
05-ml-applications/numpy-ml/for ML implementations
π Content StatisticsΒΆ
Total Notebooks: ~50+ unique notebooks
Total Exercises: 100+ (numpy-100) + 11 topic sets
Advanced Tutorials: 10+ real-world applications
ML Implementations: Complete library with 100+ algorithms
ποΈ Excluded Content (Duplicates)ΒΆ
The following directories were excluded because they contained duplicate content:
numpy_youtube/ΒΆ
Status: Duplicate of
Intro_To_Numpy/Reason: Contains identical files with same filenames
Files: copyview.ipynb, filtering.ipynb, fun.ipynb, intro.ipynb, it.ipynb, s.ipynb, searcher.ipynb, shaper.ipynb, slice.ipynb, slice2d.ipynb
π Source RepositoriesΒΆ
This consolidated collection was created from the following GitHub repositories:
python-bootcamp-numpy - Pierian Data Python for Data Science Bootcamp
NumPy Tutorial - Basic NumPy tutorial
Intro_To_Numpy - YouTube-based NumPy course
numpy-100 - https://github.com/rougier/numpy-100
numpy_exercises - Topic-based NumPy exercises
numpy-tutorials - https://github.com/numpy/numpy-tutorials
numpy-ml - https://github.com/ddbourgin/numpy-ml
π Getting StartedΒΆ
# Install NumPy
pip install numpy
# Import NumPy
import numpy as np
# Verify installation
print(np.__version__)
π‘ Tips for SuccessΒΆ
Practice Daily: Work through 3-5 exercises per day
Type Code: Donβt copy-paste; type out examples to build muscle memory
Experiment: Modify examples to test your understanding
Read Docs: Use
np.array?in Jupyter to access documentationDebug: Use
print()statements to understand array shapes and valuesPerformance: Use
%timeitto compare different approaches
π Additional ResourcesΒΆ
π ContributingΒΆ
If you find errors or have improvements:
Note the specific file and line number
Describe the issue or improvement
Submit corrections or enhancements
π LicenseΒΆ
Individual directories may have their own licenses. Please refer to original repository licenses for attribution and usage rights.
Last Updated: December 2024 Consolidated By: Automated deduplication process Total Files Before: 158 files across 8 directories Total Files After: ~60 unique files (62% reduction)