{"id":2571,"date":"2026-02-02T11:19:17","date_gmt":"2026-02-02T11:19:17","guid":{"rendered":"https:\/\/demo.materiamedica.net\/demo6\/?p=2571"},"modified":"2026-02-02T11:19:17","modified_gmt":"2026-02-02T11:19:17","slug":"chapter-5-numpy-study-plan","status":"publish","type":"post","link":"https:\/\/demo.materiamedica.net\/demo6\/chapter-5-numpy-study-plan\/","title":{"rendered":"Chapter 5: NumPy Study Plan"},"content":{"rendered":"<p dir=\"auto\"><strong>NumPy Study Plan<\/strong> written in the voice of an experienced teacher who has already helped dozens of students go from \u201cNumPy scares me\u201d to \u201cI can\u2019t imagine coding without it\u201d.<\/p>\n<p dir=\"auto\">This is <strong>not<\/strong> a dry list of topics. It is a <strong>realistic roadmap<\/strong> with:<\/p>\n<ul dir=\"auto\">\n<li>clear phases<\/li>\n<li>recommended time investment<\/li>\n<li>precise learning goals<\/li>\n<li>curated exercises &amp; mini-projects<\/li>\n<li>common failure patterns &amp; how to avoid them<\/li>\n<li>recommended resources (free &amp; paid)<\/li>\n<li>checkpoints so you know when you\u2019re ready to move on<\/li>\n<li>honest advice about what actually matters in 2025\u20132026<\/li>\n<\/ul>\n<h3 dir=\"auto\">NumPy Study Plan \u2013 From Zero to Professional Comfort (2025\u20132026)<\/h3>\n<p dir=\"auto\"><strong>Total realistic time<\/strong>: 40\u2013100 hours (depending on your starting level and how much you practice)<\/p>\n<p dir=\"auto\"><strong>Who this plan is for<\/strong><\/p>\n<ul dir=\"auto\">\n<li>Knows basic Python (lists, loops, functions, if\/else)<\/li>\n<li>Wants to use NumPy seriously (data analysis, ML, scientific computing, automation, finance, image\/video processing, simulations\u2026)<\/li>\n<\/ul>\n<p dir=\"auto\"><strong>Starting assumption<\/strong> You have never used NumPy seriously or you tried it once and got confused\/frustrated.<\/p>\n<h3 dir=\"auto\">Phase 0 \u2013 Mindset &amp; Setup (2\u20135 hours)<\/h3>\n<p dir=\"auto\">Goal: Remove fear and create the most comfortable environment<\/p>\n<p dir=\"auto\"><strong>Day 0 \u2013 Mental preparation (30\u201360 min)<\/strong><\/p>\n<p dir=\"auto\">Watch or read (in this order):<\/p>\n<ol dir=\"auto\">\n<li>\u201cWhy NumPy?\u201d 5-minute video (search: \u201cWhy use NumPy instead of lists\u201d \u2013 Corey Schafer or similar)<\/li>\n<li>\u201cNumPy in 5 minutes\u201d overview (search: \u201cNumPy crash course\u201d \u2013 sentdex or freeCodeCamp)<\/li>\n<li>One short article: \u201cThe most important thing beginners miss about NumPy\u201d (search similar title)<\/li>\n<\/ol>\n<p dir=\"auto\">Key mindset shifts to accept <strong>before<\/strong> writing any code:<\/p>\n<ul dir=\"auto\">\n<li>Python lists are general-purpose \u2192 NumPy arrays are <strong>numeric-only<\/strong> and <strong>fixed-type<\/strong><\/li>\n<li>Loops are almost always the wrong way to use NumPy<\/li>\n<li>Broadcasting is the #1 reason NumPy feels like magic<\/li>\n<li>Shape is the most important property \u2014 read it every time<\/li>\n<\/ul>\n<p dir=\"auto\"><strong>Day 0 \u2013 Setup (1\u20134 hours)<\/strong><\/p>\n<p dir=\"auto\">Choose <strong>one<\/strong> primary environment (my strong recommendation order in 2025):<\/p>\n<ol dir=\"auto\">\n<li><strong>JupyterLab local<\/strong> (best learning experience) \u2192 install via Anaconda or miniforge + mamba \u2192 run jupyter lab<\/li>\n<li><strong>VS Code + Jupyter extension<\/strong> (best long-term) \u2192 install VS Code \u2192 install \u201cJupyter\u201d + \u201cPython\u201d + \u201cPylance\u201d extensions \u2192 create .ipynb files<\/li>\n<li><strong>Google Colab<\/strong> (zero installation, free GPU) \u2192 colab.research.google.com<\/li>\n<\/ol>\n<p dir=\"auto\">Install the must-have packages once:<\/p>\n<div dir=\"auto\">\n<div data-testid=\"code-block\">\n<div>\n<div>Bash<\/div>\n<div>\n<pre tabindex=\"0\"><code>pip install numpy pandas matplotlib seaborn scipy jupyterlab ipywidgets<\/code><\/pre>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<p dir=\"auto\">Save this <strong>starter cell<\/strong> and run it at the beginning of every new notebook:<\/p>\n<div dir=\"auto\">\n<div data-testid=\"code-block\">\n<div>\n<div>Python<\/div>\n<div>\n<pre tabindex=\"0\"><code>%matplotlib inline\r\n%config InlineBackend.figure_format = 'retina'\r\n\r\nimport numpy as np\r\nimport pandas as pd\r\nimport matplotlib.pyplot as plt\r\nimport seaborn as sns\r\n\r\nsns.set_theme(style=\"whitegrid\", font_scale=1.1)\r\npd.set_option('display.float_format', '{:.4f}'.format)\r\n\r\nprint(\"NumPy version:\", np.__version__)\r\nprint(\"Ready! Let's go.\")<\/code><\/pre>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<h3 dir=\"auto\">Phase 1 \u2013 Core Survival Kit (10\u201320 hours)<\/h3>\n<p dir=\"auto\">Goal: You can create, inspect, index, slice, filter, do basic math \u2014 and <strong>never write element-wise loops again<\/strong><\/p>\n<p dir=\"auto\"><strong>Week 1 \u2013 Days 1\u20134 (\u22488\u201312 h)<\/strong><\/p>\n<p dir=\"auto\"><strong>Topic 1 \u2013 Array creation \u2013 the 10 most important ways<\/strong> (2\u20134 h)<\/p>\n<p dir=\"auto\">Must master (do all):<\/p>\n<ul dir=\"auto\">\n<li>np.array([&#8230;])<\/li>\n<li>np.zeros(), np.ones(), np.full()<\/li>\n<li>np.arange(), np.linspace()<\/li>\n<li>np.eye(), np.diag()<\/li>\n<li>np.random.rand(), randn(), randint(), uniform(), normal()<\/li>\n<li>np.empty() (know the danger)<\/li>\n<\/ul>\n<p dir=\"auto\"><strong>Must-do exercises<\/strong><\/p>\n<ol dir=\"auto\">\n<li>Create 8 different arrays that all contain exactly 100 times the number 3.14159 (different methods)<\/li>\n<li>Create 5\u00d75 identity matrix, then set diagonal to 7<\/li>\n<li>Create 100\u00d7100 array filled with 0 \u2192 set border to 1, center 20\u00d720 to 5<\/li>\n<\/ol>\n<p dir=\"auto\"><strong>Topic 2 \u2013 Understanding shape, ndim, size, dtype, memory<\/strong> (1\u20132 h)<\/p>\n<p dir=\"auto\">Must be automatic:<\/p>\n<div dir=\"auto\">\n<div data-testid=\"code-block\">\n<div>\n<div>Python<\/div>\n<div>\n<pre tabindex=\"0\"><code>.shape  .ndim  .size  .dtype  .itemsize  .nbytes<\/code><\/pre>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<p dir=\"auto\"><strong>Topic 3 \u2013 Views vs Copies \u2013 the #1 source of bugs<\/strong> (3\u20136 h)<\/p>\n<p dir=\"auto\">Must deeply understand:<\/p>\n<div dir=\"auto\">\n<div data-testid=\"code-block\">\n<div>\n<div>Python<\/div>\n<div>\n<pre tabindex=\"0\"><code>b = a                # view\r\nb = a.copy()         # deep copy\r\nb = a[:]             # usually view\r\nb = a[::2]           # view\r\nb = a[[1,3,5]]       # copy (fancy)\r\nb = a[a &gt; 0]         # copy (boolean)<\/code><\/pre>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<p dir=\"auto\"><strong>Must-do exercise<\/strong> Create array a \u2192 make 7 different b&#8217;s \u2192 set b[0] = 999 \u2192 check if a changed Identify which cases are views and which are copies.<\/p>\n<p dir=\"auto\"><strong>Topic 4 \u2013 Indexing &amp; Slicing Mastery<\/strong> (3\u20135 h)<\/p>\n<p dir=\"auto\">Must be fluent reading and writing:<\/p>\n<ul dir=\"auto\">\n<li>basic a[3, -1]<\/li>\n<li>slicing a[2:8:2], a[::-1]<\/li>\n<li>boolean a[a &gt; 50], a[(a &gt; 20) &amp; (a &lt; 80)]<\/li>\n<li>fancy a[[1,4,7], [2,5,0]]<\/li>\n<li>combined a[a[:,0] &gt; 100, 2:5]<\/li>\n<\/ul>\n<p dir=\"auto\"><strong>Must-do exercises<\/strong><\/p>\n<ol dir=\"auto\">\n<li>Create 10\u00d712 array \u2192 extract bottom-right 5\u00d76 submatrix<\/li>\n<li>Replace all multiples of 7 with -999<\/li>\n<li>Keep only rows where sum &gt; 500<\/li>\n<\/ol>\n<p dir=\"auto\"><strong>Checkpoint \u2013 end of Phase 1<\/strong> You can confidently:<\/p>\n<ul dir=\"auto\">\n<li>create any array you need<\/li>\n<li>inspect its properties instantly<\/li>\n<li>index\/slice\/filter\/replace values without loops<\/li>\n<li>know when you\u2019re creating a view vs copy<\/li>\n<\/ul>\n<h3 dir=\"auto\">Phase 2 \u2013 Vectorization &amp; Broadcasting Power (12\u201325 hours)<\/h3>\n<p dir=\"auto\"><strong>Week 2\u20134<\/strong><\/p>\n<p dir=\"auto\"><strong>Topic 5 \u2013 Arithmetic &amp; Broadcasting<\/strong> (4\u20138 h)<\/p>\n<p dir=\"auto\">Must be automatic:<\/p>\n<div dir=\"auto\">\n<div data-testid=\"code-block\">\n<div>\n<div>Python<\/div>\n<div>\n<pre tabindex=\"0\"><code>+ - * \/ \/\/ % ** &gt; &gt;= &lt; &lt;= == !=\r\nnp.clip, np.maximum, np.minimum<\/code><\/pre>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<p dir=\"auto\"><strong>Must-do exercises<\/strong><\/p>\n<ol dir=\"auto\">\n<li>Create 100\u00d7100 array where value[i,j] = sin(i\/10) * cos(j\/10) * 100<\/li>\n<li>Normalize 5000\u00d730 random matrix column-wise (mean=0, std=1)<\/li>\n<li>Add row vector to matrix, then add column vector<\/li>\n<\/ol>\n<p dir=\"auto\"><strong>Topic 6 \u2013 Reductions &amp; Axis magic<\/strong> (3\u20136 h)<\/p>\n<p dir=\"auto\">Must know:<\/p>\n<div dir=\"auto\">\n<div data-testid=\"code-block\">\n<div>\n<div>Python<\/div>\n<div>\n<pre tabindex=\"0\"><code>.sum(axis=0\/1\/-1)  .mean()  .std()  .min()  .max()  .argmin()  .any()  .all()\r\n.cumsum()  .cumprod()<\/code><\/pre>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<p dir=\"auto\"><strong>Must-do exercises<\/strong><\/p>\n<ol dir=\"auto\">\n<li>12 months \u00d7 8 products sales \u2192 monthly total, product total, cumulative monthly<\/li>\n<li>Find rows where all values &gt; 0<\/li>\n<li>Find column with highest average<\/li>\n<\/ol>\n<p dir=\"auto\"><strong>Topic 7 \u2013 Masking, np.where, filtering, replacing<\/strong> (3\u20136 h)<\/p>\n<p dir=\"auto\">Must be fluent:<\/p>\n<div dir=\"auto\">\n<div data-testid=\"code-block\">\n<div>\n<div>Python<\/div>\n<div>\n<pre tabindex=\"0\"><code>arr[arr &gt; 50] = 0\r\narr = np.where(arr &lt; 0, 0, arr)<\/code><\/pre>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<p dir=\"auto\"><strong>Must-do exercises<\/strong><\/p>\n<ol dir=\"auto\">\n<li>Replace negatives with 0, &gt;100 with 100, 40\u201360 with negative<\/li>\n<li>Keep only rows where at least 3 values &gt; 2.0<\/li>\n<li>Set outliers (&gt; 3 std) to NaN<\/li>\n<\/ol>\n<p dir=\"auto\"><strong>Checkpoint \u2013 end of Phase 2<\/strong> You can:<\/p>\n<ul dir=\"auto\">\n<li>do math on entire arrays without loops<\/li>\n<li>understand and use broadcasting confidently<\/li>\n<li>reduce along any axis<\/li>\n<li>filter, mask, replace conditionally<\/li>\n<\/ul>\n<h3 dir=\"auto\">Phase 3 \u2013 Intermediate &amp; Real-world Mastery (12\u201325 hours)<\/h3>\n<p dir=\"auto\"><strong>Topic 8 \u2013 Reshape, transpose, ravel vs flatten<\/strong> (2\u20134 h)<\/p>\n<p dir=\"auto\"><strong>Topic 9 \u2013 Concatenate, stack, split, tile, repeat<\/strong> (3\u20135 h)<\/p>\n<p dir=\"auto\"><strong>Topic 10 \u2013 Random \u2013 distributions, seed, shuffle, choice<\/strong> (3\u20136 h)<\/p>\n<p dir=\"auto\"><strong>Topic 11 \u2013 Sorting, argsort, unique, unique rows<\/strong> (2\u20134 h)<\/p>\n<p dir=\"auto\"><strong>Topic 12 \u2013 Linear algebra basics<\/strong> (optional but very useful)<\/p>\n<div dir=\"auto\">\n<div data-testid=\"code-block\">\n<div>\n<div>Python<\/div>\n<div>\n<pre tabindex=\"0\"><code>np.dot, @ operator, np.linalg.norm, np.linalg.inv, np.linalg.solve<\/code><\/pre>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<p dir=\"auto\"><strong>Mini-projects to tie everything together<\/strong> (choose 3\u20135)<\/p>\n<ol dir=\"auto\">\n<li>Clean, normalize, visualize a real CSV dataset (Kaggle)<\/li>\n<li>Simulate stock prices \u2192 compute returns, volatility, drawdown<\/li>\n<li>Process small image: brightness, contrast, grayscale, simple edge detection<\/li>\n<li>Implement simple moving average \/ rolling statistics vectorized<\/li>\n<li>Create synthetic dataset with different distributions \u2192 visualize<\/li>\n<\/ol>\n<h3 dir=\"auto\">Suggested realistic timeline<\/h3>\n<p dir=\"auto\"><strong>Phase 1<\/strong> \u2192 1\u20133 weeks (10\u201320 h) <strong>Phase 2<\/strong> \u2192 2\u20135 weeks (12\u201325 h) <strong>Phase 3<\/strong> \u2192 3\u20138 weeks (15\u201330 h) <strong>Mini-projects<\/strong> \u2192 ongoing<\/p>\n<p dir=\"auto\"><strong>Total<\/strong> \u2248 40\u201380 hours spread over 2\u20135 months (realistic pace)<\/p>\n<h3 dir=\"auto\">Final teacher letter to you<\/h3>\n<p dir=\"auto\">Dear student,<\/p>\n<p dir=\"auto\">NumPy mastery is <strong>not<\/strong> about knowing every function. It is about reaching the point where:<\/p>\n<ul dir=\"auto\">\n<li>you <strong>never<\/strong> write element-wise for-loops<\/li>\n<li>you <strong>automatically<\/strong> think \u201cshape first, then axis\u201d<\/li>\n<li>you <strong>instinctively<\/strong> reach for broadcasting and masking<\/li>\n<li>you <strong>feel faster<\/strong> and more confident than people using only lists<\/li>\n<\/ul>\n<p dir=\"auto\">You will get there <strong>much faster<\/strong> if you:<\/p>\n<ul dir=\"auto\">\n<li>write <strong>many tiny cells<\/strong> instead of big scripts<\/li>\n<li><strong>print shapes and small samples<\/strong> constantly<\/li>\n<li><strong>experiment<\/strong> \u2014 change one thing, see what breaks<\/li>\n<li><strong>redo exercises<\/strong> without looking at your previous code<\/li>\n<\/ul>\n<p dir=\"auto\">You don\u2019t need to finish the whole syllabus. You just need to reach the point where NumPy feels <strong>natural<\/strong>.<\/p>\n<p dir=\"auto\">When you get stuck, frustrated or surprised \u2014 that\u2019s normal. That\u2019s exactly when real learning happens.<\/p>\n<p dir=\"auto\">So\u2026 which part do you want to start with right now?<\/p>\n<ul dir=\"auto\">\n<li>Phase 1 exercises<\/li>\n<li>More advanced broadcasting challenges<\/li>\n<li>A small guided mini-project<\/li>\n<li>Common beginner mistakes &amp; debugging tricks<\/li>\n<li>Anything else<\/li>\n<\/ul>\n<p dir=\"auto\">Just tell me \u2014 I\u2019m here for you. \ud83d\ude0a<\/p>\n","protected":false},"excerpt":{"rendered":"<p>NumPy Study Plan written in the voice of an experienced teacher who has already helped dozens of students go from \u201cNumPy scares me\u201d to \u201cI can\u2019t imagine coding without it\u201d. This is not a&#46;&#46;&#46;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[75],"tags":[],"class_list":["post-2571","post","type-post","status-publish","format-standard","hentry","category-numpy"],"_links":{"self":[{"href":"https:\/\/demo.materiamedica.net\/demo6\/wp-json\/wp\/v2\/posts\/2571","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/demo.materiamedica.net\/demo6\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/demo.materiamedica.net\/demo6\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/demo.materiamedica.net\/demo6\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/demo.materiamedica.net\/demo6\/wp-json\/wp\/v2\/comments?post=2571"}],"version-history":[{"count":1,"href":"https:\/\/demo.materiamedica.net\/demo6\/wp-json\/wp\/v2\/posts\/2571\/revisions"}],"predecessor-version":[{"id":2572,"href":"https:\/\/demo.materiamedica.net\/demo6\/wp-json\/wp\/v2\/posts\/2571\/revisions\/2572"}],"wp:attachment":[{"href":"https:\/\/demo.materiamedica.net\/demo6\/wp-json\/wp\/v2\/media?parent=2571"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/demo.materiamedica.net\/demo6\/wp-json\/wp\/v2\/categories?post=2571"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/demo.materiamedica.net\/demo6\/wp-json\/wp\/v2\/tags?post=2571"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}