Complete Python NumPy Tutorial (Creating Arrays, Indexing, Math, Statistics, Reshaping) @KeithGalli
Complete Python NumPy Tutorial (Creating Arrays, Indexing, Math, Statistics, Reshaping)  @KeithGalli
Uploaded July 2019 | Updated November 2026, 3 hours ago
Check out stratascratch.com/?via=keith to practice your Python Pandas data science skills!

This video overviews the NumPy library. It provides background information on how NumPy works and how it compares to Python's Built-in lists. This video goes through how to write code with NumPy. It starts with the basics of creating arrays and then gets into more advanced stuff. A full video timeline can be found in the comments.

Link to code used in video: github.com/KeithGalli/NumPy

Feel free to watch at 1.5x to learn more quickly!

If you enjoyed this video, please consider subscribing :).

Let me know your feedback and what I should make a video on next.

----------------------------
Videos of mine that use NumPy
- Creating Connect 4 Game: youtu.be/UYgyRArKDEs
- Plotting (with some use of NumPy): youtu.be/DAQNHzOcO5A
- Generating Mock Data: youtu.be/VJBY2eVtf7o

----------------------------
Links with more information!

NumPy vs Lists:
jakevdp.github.io/blog/2014/05/09/why-python-is-slow

Indexing:
docs.scipy.org/doc/numpy-1.13.0/user/basics.indexing.html

Array Creation Routines:
docs.scipy.org/doc/numpy/reference/routines.array-creation.html

Math Routines Docs:
docs.scipy.org/doc/numpy/reference/routines.math.html

Linear Algebra Docs:
docs.scipy.org/doc/numpy/reference/routines.linalg.html

----------------------------
Video Timeline!
0:00 - Introduction
1:15 - What is NumPy
1:35 - NumPy vs Lists (speed, functionality)
9:17 - Applications of NumPy
11:08 - The Basics (creating arrays, shape, size, data type)
16:08 - Accessing/Changing Specific Elements, Rows, Columns, etc (slicing)
23:14 - Initializing Different Arrays (1s, 0s, full, random, etc...)
31:34 - Problem #1 (How do you initialize this array?)
33:42 - Be careful when copying variables!
35:45 - Basic Mathematics (arithmetic, trigonometry, etc.)
38:20 - Linear Algebra
42:19 - Statistics
43:57 - Reorganizing Arrays (reshape, vstack, hstack)
47:29 - Load data in from a file
50:20 - Advanced Indexing and Boolean Masking
55:59 - Problem #2 (How do you index these values?)

---------------------
If you are curious to learn how I make my tutorials, check out this video: youtu.be/LEO4igyXbLs

Join the Python Army to get access to perks!
YouTube - youtube.com/channel/UCq6XkhO5SZ66N04IcPbqNcw/join
Patreon - patreon.com/keithgalli

*I use affiliate links on the products that I recommend. I may earn a purchase commission or a referral bonus from the usage of these links.
Complete Python NumPy Tutorial (Creating Arrays, Indexing, Math, Statistics, Reshaping)3 Insider Tips to Stay Ahead in Programming!Comprehensive Python Beautiful Soup Web Scraping Tutorial! (find/find_all, css select, scrape table)Winning at Connect 4 for an Hour Straight!Creating Analytics Dashboards, Websites, Slideshows and more with Python! | Quarto Crash CourseHow to Make a High Quality Tutorial Video! (workflow, camera equipment, and software tools)Complete Natural Language Processing (NLP) Tutorial in Python! (with examples)Real-World Python Machine Learning Tutorial w/ Scikit Learn (sklearn basics, NLP, classifiers, etc)Dynamic Programming Example - FibonacciHow to Program a Connect 4 AI (implementing the minimax algorithm)Solving Real-World Data Science Problems with LLMs! (Historical Document Analysis)Learning the Polars DataFrame Library!
Keith Galli |

Complete Python NumPy Tutorial (Creating Arrays, Indexing, Math, Statistics, Reshaping)

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER