[{"data":1,"prerenderedAt":124},["ShallowReactive",2],{"term-n\u002Fnumpy":3,"related-n\u002Fnumpy":113},{"id":4,"title":5,"acronym":6,"body":7,"category":96,"description":97,"difficulty":98,"extension":99,"letter":100,"meta":101,"navigation":53,"path":102,"related":103,"seo":107,"sitemap":108,"stem":111,"subcategory":6,"__hash__":112},"terms\u002Fterms\u002Fn\u002Fnumpy.md","NumPy",null,{"type":8,"value":9,"toc":90},"minimark",[10,15,19,23,26,30,79,83,86],[11,12,14],"h2",{"id":13},"eli5-the-vibe-check","ELI5 - The Vibe Check",[16,17,18],"p",{},"NumPy is the engine underneath almost every other Python data and ML library, giving you arrays and math operations that run at C speed instead of Python's normal, much slower speed. Where a plain Python loop might take minutes to crunch a million numbers, the same operation in NumPy takes milliseconds, because it's not really running Python under the hood at all.",[11,20,22],{"id":21},"real-talk","Real Talk",[16,24,25],{},"NumPy provides the ndarray, a fast, memory-efficient multidimensional array, along with vectorized mathematical operations implemented in compiled C code, avoiding the overhead of Python-level loops. It's the foundational library that pandas, scikit-learn, and most of the Python scientific computing stack are built directly on top of.",[11,27,29],{"id":28},"show-me-the-code","Show Me The Code",[31,32,37],"pre",{"className":33,"code":34,"language":35,"meta":36,"style":36},"language-python shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","import numpy as np\n\narr = np.array([1, 2, 3, 4, 5])\nprint(arr.mean(), arr.std())\nmatrix = np.random.rand(1000, 1000)\nresult = matrix @ matrix.T  # fast matrix multiplication\n","python","",[38,39,40,48,55,61,67,73],"code",{"__ignoreMap":36},[41,42,45],"span",{"class":43,"line":44},"line",1,[41,46,47],{},"import numpy as np\n",[41,49,51],{"class":43,"line":50},2,[41,52,54],{"emptyLinePlaceholder":53},true,"\n",[41,56,58],{"class":43,"line":57},3,[41,59,60],{},"arr = np.array([1, 2, 3, 4, 5])\n",[41,62,64],{"class":43,"line":63},4,[41,65,66],{},"print(arr.mean(), arr.std())\n",[41,68,70],{"class":43,"line":69},5,[41,71,72],{},"matrix = np.random.rand(1000, 1000)\n",[41,74,76],{"class":43,"line":75},6,[41,77,78],{},"result = matrix @ matrix.T  # fast matrix multiplication\n",[11,80,82],{"id":81},"when-youll-hear-this","When You'll Hear This",[16,84,85],{},"\"Vectorize that loop with NumPy, it'll run a hundred times faster.\" \u002F \"Under the hood, pandas is just NumPy arrays with labels and a lot of convenience methods bolted on.\"",[87,88,89],"style",{},"html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":36,"searchDepth":50,"depth":50,"links":91},[92,93,94,95],{"id":13,"depth":50,"text":14},{"id":21,"depth":50,"text":22},{"id":28,"depth":50,"text":29},{"id":81,"depth":50,"text":82},"ai","NumPy is the engine underneath almost every other Python data and ML library, giving you arrays and math operations that run at C speed instead of Python's...","beginner","md","n",{},"\u002Fterms\u002Fn\u002Fnumpy",[104,105,106],"Pandas","scikit-learn","Machine Learning",{"title":5,"description":97},{"changefreq":109,"priority":110},"weekly",0.7,"terms\u002Fn\u002Fnumpy","KhB2AP5rqc3fulqg4nrZSly00by56a0ACEUgiqWg9QQ",[114,118,121],{"title":106,"path":115,"acronym":116,"category":96,"difficulty":98,"description":117},"\u002Fterms\u002Fm\u002Fmachine-learning","ML","Machine Learning is teaching a computer by showing it thousands of examples instead of writing out every rule.",{"title":104,"path":119,"acronym":6,"category":96,"difficulty":98,"description":120},"\u002Fterms\u002Fp\u002Fpandas","Pandas is the Python library that turns a spreadsheet-shaped pile of data into something your code can actually filter, group, join, and reshape in a coupl...",{"title":105,"path":122,"acronym":6,"category":96,"difficulty":98,"description":123},"\u002Fterms\u002Fs\u002Fscikit-learn","scikit-learn is the toolbox that made classical machine learning boringly easy in Python: it gives you dozens of ready-to-use algorithms, from linear regre...",1792528103538]