[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"doc-seo-685801-105":3,"detail-sidebar-cat-0-en-105":81,"doc-detail-685801-en":130,"doc-similar-685801":221},{"code":4,"msg":5,"data":6},0,"ok",{"site_id":7,"language":8,"slug":9,"title":10,"keywords":11,"description":12,"schema_data":13,"social_meta":74,"head_meta":76,"extra_data":78,"updated_unix":80},105,"en","numpy-user-guide-release-1166-an-introductory-overview","NumPy User Guide - Release 1.16.6 - An introductory overview","","NumPy User Guide (Release 1.16.6) provides an introductory overview of NumPy for scientific computing in Python, focusing on what NumPy is and why its array model matters. It explains the ndarray core and contrasts NumPy arrays with standard Python sequences in terms of fixed size, homogeneous data types, memory layout, and performance. The guide introduces key concepts such as vectorization and broadcasting, showing how element-wise operations can run near-C speed with simpler Python code, reducing loops and improving readability for large data.",{"@graph":14,"@context":73},[15,34,56],{"@type":16,"itemListElement":17},"BreadcrumbList",[18,23,27,31],{"item":19,"name":20,"@type":21,"position":22},"https://docshare.wps.com","Home","ListItem",1,{"item":24,"name":25,"@type":21,"position":26},"https://docshare.wps.com/document/","Document",2,{"item":28,"name":29,"@type":21,"position":30},"https://docshare.wps.com/document/technology/","Technology",3,{"item":32,"name":10,"@type":21,"position":33},"https://docshare.wps.com/document/numpy-user-guide-release-1166-an-introductory-overview/685801/",4,{"url":32,"name":10,"@type":35,"image":36,"author":41,"headline":10,"publisher":44,"fileFormat":47,"inLanguage":8,"description":12,"dateModified":48,"datePublished":49,"encodingFormat":47,"isAccessibleForFree":50,"interactionStatistic":51},"DigitalDocument",{"url":37,"@type":38,"width":39,"height":40},"https://docshare.wps.com/thumbnails/numpy-user-guide-release-1166-an-introductory-overview/685801.png","ImageObject",300,407,{"name":42,"@type":43},"Grenda","Person",{"url":19,"name":45,"@type":46},"DocShare","Organization","application/pdf","2026-11-23","2026-11-07",true,{"@type":52,"interactionType":53,"userInteractionCount":55},"InteractionCounter",{"@type":54},"ViewAction",9,{"@type":57,"mainEntity":58},"FAQPage",[59,65,69],{"name":60,"@type":61,"acceptedAnswer":62},"What is NumPy and what does it provide for scientific computing?","Question",{"text":63,"@type":64},"NumPy is the fundamental Python package for scientific computing. It provides a multidimensional ndarray object plus routines for fast array operations such as math, logic, shape manipulation, sorting, I/O, Fourier transforms, linear algebra, statistics, and random simulation.","Answer",{"name":66,"@type":61,"acceptedAnswer":67},"How is an ndarray different from standard Python sequences like lists?",{"text":68,"@type":64},"NumPy arrays have a fixed size at creation, and their elements must share the same data type (with an exception for object arrays). This design enables efficient compiled-code operations and performance advantages for large datasets.",{"name":70,"@type":61,"acceptedAnswer":71},"What are vectorization and broadcasting in NumPy?",{"text":72,"@type":64},"Vectorization means writing code without explicit loops or indexing, while the underlying work happens in optimized pre-compiled C code. Broadcasting refers to implicit element-by-element behavior where operations can apply to arrays with compatible shapes, including scalars and differently shaped arrays.","https://schema.org",{"og:url":32,"og:type":75,"og:title":10,"og:site_name":45,"og:description":12},"article",{"robots":77,"canonical":32},"index,follow",{"doc_id":79,"site_id":7},685801,1794018701,{"code":4,"msg":82,"data":83},"success",[84,88,92,96,101,105,110,115,119,122,126],{"id":22,"doc_module":4,"doc_module_name":25,"category_name":85,"show_sort_weight":86,"slug":87},"Story & Novel",90,"story-novel",{"id":26,"doc_module":4,"doc_module_name":25,"category_name":89,"show_sort_weight":90,"slug":91},"Literature",80,"literature",{"id":33,"doc_module":4,"doc_module_name":25,"category_name":93,"show_sort_weight":94,"slug":95},"Exam",70,"exam",{"id":97,"doc_module":4,"doc_module_name":25,"category_name":98,"show_sort_weight":99,"slug":100},5,"Comic",60,"comic",{"id":102,"doc_module":4,"doc_module_name":25,"category_name":29,"show_sort_weight":103,"slug":104},6,50,"technology",{"id":106,"doc_module":4,"doc_module_name":25,"category_name":107,"show_sort_weight":108,"slug":109},7,"Healthcare",40,"healthcare",{"id":111,"doc_module":4,"doc_module_name":25,"category_name":112,"show_sort_weight":113,"slug":114},8,"Research & Report",30,"research-report",{"id":55,"doc_module":4,"doc_module_name":25,"category_name":116,"show_sort_weight":117,"slug":118},"Religion & Spirituality",20,"religion-spirituality",{"id":117,"doc_module":4,"doc_module_name":25,"category_name":120,"show_sort_weight":117,"slug":121},"World Cup","world-cup",{"id":123,"doc_module":4,"doc_module_name":25,"category_name":124,"show_sort_weight":123,"slug":125},10,"Lifestyle","lifestyle",{"id":127,"doc_module":4,"doc_module_name":25,"category_name":128,"show_sort_weight":97,"slug":129},19,"General","general",{"code":4,"msg":82,"data":131},{"doc_id":79,"user_id":132,"nickname":42,"user_avatar":133,"doc_module":4,"category_id":102,"category_name":29,"doc_title":10,"doc_description":12,"doc_content":134,"file_id":135,"file_url":136,"file_type":137,"file_size":138,"view_count":55,"is_deleted":4,"is_public":22,"is_downloadable":22,"audit_status":22,"page_count":139,"language":140,"language_code":8,"site_id":7,"html_lang":8,"table_of_contents":141,"faqs":142,"seo_title":143,"seo_description":12,"update_tm":80,"read_time":144,"preview_page_count":145,"preview_urls":146},7971474921005,"https://ap-avatar.wpscdn.com/davatar_29158cc5080c5b710cf443261637dec0","NumPy User Guide  \nRelease 1.16.6  \nWritten by the NumPy community  \nFebruary 18, 2020  \nCONTENTS  \n1 Setting up 3  \n2 Quickstart tutorial 5  \n3 NumPy basics 29  \n4 Miscellaneous 89  \n5 NumPy for Matlab users 95  \n6 Building from source 103  \n7 Using NumPy C-API 107  \nPython Module Index 155  \nIndex 157  \nii  \nThis guide is intended as an introductory overview of NumPy and explains how to install and make use of the most important features of NumPy. For detailed reference documentation of the functions and classes contained in the package, see the reference.  \nCHAPTER  \nONE  \nSETTING UP  \n1.1 What is NumPy?  \nNumPy is the fundamental package for scientiﬁc computing in Python. It is a Python library that provides a multidimensional array object, various derived objects (such as masked arrays and matrices), and an assortment of routines for fast operations on arrays, including mathematical, logical, shape manipulation, sorting, selecting, I/O, discrete Fourier transforms, basic linear algebra, basic statistical operations, random simulation and much more.  \nAt the core of the NumPy package, is the ndarray object. This encapsulates n-dimensional arrays of homogeneous data types, with many operations being performed in compiled code for performance. There are several important differences between NumPy arrays and the standard Python sequences:  \n• NumPy arrays have a ﬁxed size at creation, unlike Python lists (which can grow dynamically) . Changing the size of an ndarray will create a new array and delete the original.  \n• The elements in a NumPy array are all required to be of the same data type, and thus will be the same size in memory. The exception: one can have arrays of (Python, including NumPy) objects, thereby allowing for arrays of different sized elements.  \n• NumPy arrays facilitate advanced mathematical and other types of operations on large numbers of data. Typically, such operations are executed more efﬁciently and with less code than is possible using Python's built-in sequences.  \n• A growing plethora of scientiﬁc and mathematical Python-based packages are using NumPy arrays; though these typically support Python-sequence input, they convert such input to NumPy arrays prior to processing, and they often output NumPy arrays. In other words, in order to efﬁciently use much (perhaps even most) of today's scientiﬁc/mathematical Python-based software, just knowing how to use Python's built-in sequence types is insufﬁcient-one also needs to know how to use NumPy arrays.  \nThe points about sequence size and speed are particularly important in scientiﬁc computing. As a simple example, consider the case of multiplying each element in a 1-D sequence with the corresponding element in another sequence of the same length. If the data are stored in two Python lists, a and b, we could iterate over each element:  \nc = []  \nfor i in range (len (a)):  \nc .append(a[i] *b[i])  \nThis produces the correct answer, but if a and b each contain millions of numbers, we will pay the price for theinefﬁciencies of looping in Python. We could accomplish the same task much more quickly in C by writing (for clarity we neglect variable declarations and initializations, memory allocation, etc.)  \nfor (i = 0; i \u003C rows; i++): { c[i] = a[i] *b[i];  \n}  \nThis saves all the overhead involved in interpreting the Python code and manipulating Python objects, but at the expense of the beneﬁts gained from coding in Python. Furthermore, the coding work required increases with the dimensionality of our data. In the case of a 2-D array, for example, the C code (abridged as before) expands to  \nfor (i = 0; i \u003C rows; i++): { for (j = 0; j \u003C columns; j++): {  \nc[i][j] = a[i][j] *b[i][j];}  \n}  \nNumPy gives us the best of both worlds: element-by-element operations are the “default mode” when an ndarray is involved, but the element-by-element operation is speedily executed by pre-compiled C code. In NumPy  \nc = a * b  \ndoes what the earlier examples do, at near-C spe","cbCaijJriYAp8UtE","https://ap.wps.com/l/cbCaijJriYAp8UtE","pdf",621980,162,"English","# Contents\n## Setting up\n## Quickstart tutorial\n## NumPy basics\n## Miscellaneous\n## NumPy for Matlab users\n## Building from source\n## Using NumPy C-API\n## Python Module Index\n## Index","[{\"question\":\"What is NumPy and what does it provide for scientific computing?\",\"answer\":\"NumPy is the fundamental Python package for scientific computing. It provides a multidimensional ndarray object plus routines for fast array operations such as math, logic, shape manipulation, sorting, I/O, Fourier transforms, linear algebra, statistics, and random simulation.\"},{\"question\":\"How is an ndarray different from standard Python sequences like lists?\",\"answer\":\"NumPy arrays have a fixed size at creation, and their elements must share the same data type (with an exception for object arrays). This design enables efficient compiled-code operations and performance advantages for large datasets.\"},{\"question\":\"What are vectorization and broadcasting in NumPy?\",\"answer\":\"Vectorization means writing code without explicit loops or indexing, while the underlying work happens in optimized pre-compiled C code. Broadcasting refers to implicit element-by-element behavior where operations can apply to arrays with compatible shapes, including scalars and differently shaped arrays.\"}]","NumPy User Guide - Release 1.16.6 - An introductory overview | PDF",408,17,[147,151,155,159,163,167,171,175,179,183,187,192,197,202,207,212,217],{"page_no":22,"url":148,"width":149,"height":150},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-09/a931aab6aafc95a0add4a42c9c9972b1.webp",983,1272,{"page_no":26,"url":152,"width":153,"height":154},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-09/08e36d39cd140483d4361e3a7ce2aa81.webp",982,1270,{"page_no":30,"url":156,"width":157,"height":158},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-09/c31c9fe60726598d9203b76291dfcfeb.webp",981,1269,{"page_no":33,"url":160,"width":161,"height":162},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-09/634453eaabad81ce3ef5495f604c04c7.webp",980,1268,{"page_no":97,"url":164,"width":165,"height":166},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-09/161beba582352ee4bb97cfea549afa80.webp",979,1267,{"page_no":102,"url":168,"width":169,"height":170},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-09/0ffc0be95a25e3fda81f07b6fe929b81.webp",978,1265,{"page_no":106,"url":172,"width":173,"height":174},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-09/11077ed50c9561a746b886ced18cbca8.webp",977,1264,{"page_no":111,"url":176,"width":177,"height":178},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-09/82cfcbd7f2d9e16b7b57bff068a30058.webp",976,1263,{"page_no":55,"url":180,"width":181,"height":182},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-09/c9bd543ce7c5ee85931e8822bf1ec855.webp",975,1261,{"page_no":123,"url":184,"width":185,"height":186},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-09/7dfd6f44b965b2a6b422dea566ce4553.webp",974,1260,{"page_no":188,"url":189,"width":190,"height":191},11,"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-09/8aa9aa13522e59d1c820962f66dcbb8c.webp",973,1259,{"page_no":193,"url":194,"width":195,"height":196},12,"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-09/5c81617a8f1a47f59bc3cc80aa790057.webp",972,1257,{"page_no":198,"url":199,"width":200,"height":201},13,"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-09/a6b1dfff2f73e5295be1f42caa3e3987.webp",971,1256,{"page_no":203,"url":204,"width":205,"height":206},14,"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-09/b094ba894aa4abf09b0e8a3f74b1d73a.webp",970,1255,{"page_no":208,"url":209,"width":210,"height":211},15,"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-09/c21f692e13ce1099179b068c4a92420c.webp",969,1254,{"page_no":213,"url":214,"width":215,"height":216},16,"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-09/c4da4727af0d8e393e2f8b4730ef9e02.webp",968,1252,{"page_no":145,"url":218,"width":219,"height":220},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-09/ab4d4b2109c9d6810deda6df1ca5d847.webp",967,1251,{"list":222,"token":11},[223,229,235,241,247,253,259,265,271,277],{"doc_id":224,"doc_title":225,"file_type":137,"home_preview_img_url":226,"slug":227,"view_count":55,"category_name":29,"create_tm":228},685802,"NumPy User Guide - Release 2.3.0","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230000213058/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796109599&Signature=JaQEXi8%2BZHyrwvJlQ90%2FLhVDVY8%3D","numpy-user-guide-release-230",1794018702,{"doc_id":230,"doc_title":231,"file_type":137,"home_preview_img_url":232,"slug":233,"view_count":111,"category_name":29,"create_tm":234},685810,"Lecture 3 - NumPy basics - Arrays and Vectorized Computation","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230000213289/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796109599&Signature=yUxC89ZR6I9%2BHVaYCPSBrwrNvuE%3D","lecture-3-numpy-basics-arrays-and-vectorized-computation",1794018719,{"doc_id":236,"doc_title":237,"file_type":137,"home_preview_img_url":238,"slug":239,"view_count":213,"category_name":29,"create_tm":240},389903,"Python For Data Science Cheat Sheet - SciPy Linear Algebra","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229917144105/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796109599&Signature=3IDSR4YNNTOXZppiCN1b52QZPak%3D","python-for-data-science-cheat-sheet-scipy-linear-algebra",1790328319,{"doc_id":242,"doc_title":243,"file_type":137,"home_preview_img_url":244,"slug":245,"view_count":97,"category_name":29,"create_tm":246},685805,"Numpy - Array - Chapter 11 - Informatics Practices","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230000213217/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796109599&Signature=2lm12KHltkGC4OzT%2FJzDM16rBDI%3D","numpy-array-chapter-11-informatics-practices",1794018711,{"doc_id":248,"doc_title":249,"file_type":137,"home_preview_img_url":250,"slug":251,"view_count":208,"category_name":29,"create_tm":252},390027,"Python For Data Science Cheat Sheet - SciPy-Linear Algebra","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229916987523/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796109599&Signature=qZIawKpTmFv1ZkFwCMh4GGTYCRQ%3D","python-for-data-science-cheat-sheet-scipy-linear-algebra-390027",1790329256,{"doc_id":254,"doc_title":255,"file_type":137,"home_preview_img_url":256,"slug":257,"view_count":102,"category_name":29,"create_tm":258},685790,"NumPy and SciPy Tutorial - Installation and Array Fundamentals","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230000209033/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796109599&Signature=q4F1E0rBeAU5W5CI0zXkfx%2FrdLU%3D","numpy-and-scipy-tutorial-installation-and-array-fundamentals",1794018485,{"doc_id":260,"doc_title":261,"file_type":137,"home_preview_img_url":262,"slug":263,"view_count":102,"category_name":29,"create_tm":264},685808,"NumPy Reference - Release 1.13.0 - Array Objects","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230000213238/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796109599&Signature=Hq59wxqwh876ku89oYdd8Rw0jHM%3D","numpy-reference-release-1130-array-objects",1794018712,{"doc_id":266,"doc_title":267,"file_type":137,"home_preview_img_url":268,"slug":269,"view_count":123,"category_name":29,"create_tm":270},673607,"Python with Hermione - Paper OS-323 - Unleash your Inner Coding Witch and Dragon","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229991569968/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796109599&Signature=TWj2yfZg5e%2FlGUwJq25L%2BPPhAZU%3D","python-with-hermione-paper-os-323-unleash-your-inner-coding-witch-and-dragon",1793685716,{"doc_id":272,"doc_title":273,"file_type":137,"home_preview_img_url":274,"slug":275,"view_count":97,"category_name":29,"create_tm":276},685783,"Programming for GCSE Topic 6.1 - Lists, Arrays, and For Loops","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230000208895/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796109599&Signature=qsSFGiETXlTDxyaBstBo%2BgQYnVg%3D","programming-for-gcse-topic-61-lists-arrays-and-for-loops",1794018470,{"doc_id":278,"doc_title":279,"file_type":137,"home_preview_img_url":280,"slug":281,"view_count":106,"category_name":29,"create_tm":282},685788,"Python Arrays - Learn How to Create, Access, and Modify Lists","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229999694760/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796109599&Signature=9zgO7bfsCVUmAKaw%2Bi%2FogfD8wT0%3D","python-arrays-learn-how-to-create-access-and-modify-lists",1794018478]