[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"doc-seo-685810-105":3,"detail-sidebar-cat-0-en-105":81,"doc-detail-685810-en":130,"doc-similar-685810":160},{"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","lecture-3-numpy-basics-arrays-and-vectorized-computation","Lecture 3 - NumPy basics - Arrays and Vectorized Computation","","Lecture 3 introduces NumPy basics, focusing on arrays and vectorized computation for efficient data work in Python. It covers core functionality areas such as fast vectorized operations for data munging, subsetting, filtering, transformations, and common array algorithms like sorting and unique. The lecture explains ndarray fundamentals (shape and dtype), array creation methods including np.array, zeros/ones, empty, and casting via astype. It also emphasizes element-wise arithmetic and conditional logic expressed as array expressions instead of loops.",{"@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/lecture-3-numpy-basics-arrays-and-vectorized-computation/685810/",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/lecture-3-numpy-basics-arrays-and-vectorized-computation/685810.png","ImageObject",300,407,{"name":42,"@type":43},"Kurz","Person",{"url":19,"name":45,"@type":46},"DocShare","Organization","application/pdf","2026-11-18","2026-11-07",true,{"@type":52,"interactionType":53,"userInteractionCount":55},"InteractionCounter",{"@type":54},"ViewAction",8,{"@type":57,"mainEntity":58},"FAQPage",[59,65,69],{"name":60,"@type":61,"acceptedAnswer":62},"What are the main functionality areas introduced in NumPy basics?","Question",{"text":63,"@type":64},"The lecture highlights fast vectorized array operations for data munging, subsetting, filtering, transformation, common array algorithms (sorting, unique, set operations), descriptive statistics and aggregation, and data alignment for merging and joining heterogeneous datasets.","Answer",{"name":66,"@type":61,"acceptedAnswer":67},"What is an ndarray and what information does it store?",{"text":68,"@type":64},"An ndarray is NumPy’s N-dimensional array object designed for large datasets. It stores a shape (size of each dimension) and dtype metadata describing the element data type.",{"name":70,"@type":61,"acceptedAnswer":71},"How can you create and type-convert NumPy arrays?",{"text":72,"@type":64},"Use np.array to create arrays from sequence-like inputs, while zeros, ones, and empty provide alternative creation options. Convert or cast dtypes with ndarray’s astype, including turning arrays of numeric strings into numeric form.","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},685810,1794018719,{"code":4,"msg":82,"data":83},"success",[84,88,92,96,101,105,110,114,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":55,"doc_module":4,"doc_module_name":25,"category_name":111,"show_sort_weight":112,"slug":113},"Research & Report",30,"research-report",{"id":115,"doc_module":4,"doc_module_name":25,"category_name":116,"show_sort_weight":117,"slug":118},9,"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":33,"preview_urls":145},2336478945635,"https://ap-avatar.wpscdn.com/davatar_6f874abed73319feea01a86fa6f0fab8","Lecture 3: NumPy basics: Arrays and Vectorized  \nComputation  \nAlpar Sultan, PhD Associate professor  \nThe main areas of functionality  \n• Fast vectorized array operations for data munging and cleaning, subsetting and filtering, transformation, and any other kinds of computations  \n• Common array algorithms like sorting, unique, and set operations  \n• Efficient descriptive statistics and aggregating/summarizing data  \n• Data alignment and relational data manipulations for merging and joining together heterogeneous datasets  \n• Expressing conditional logic as array expressions instead of loops with ifelifelse branches  \n• Group-wise data manipulations (aggregation, transformation, function application)  \nThe NumPy ndarray: A multidimensional Array Object  \n• One of the key features of NumPy is its N-dimensional array object, or ndarray, which is a fast, flexible container for large datasets in Python. Arrays enable you to perform mathematical operations on whole blocks of data using similar syntax to the equivalent operations between scalar elements  \n• An ndarray is a generic multidimensional container for homogeneous data; that is, all of the elements must be the same type. Every array has a shape, a tuple indicating the size of each dimension, and adtype, an object describing the data type of the array.  \nCreating ndarrays  \n• The easiest way to create an array is to use the array function. This accepts any sequence-like object (including other arrays) and produces a new NumPy array containing the passed data.  \n• Nested sequences, like a list of equal-length lists, will be converted into a multidimensional array:  \n• Since data2 was a list of lists, the NumPy array arr2 has two dimensions with shape inferred from the data. We can confirm this by inspecting the ndim and shape attributes  \n• Unless explicitly specified np.array tries to infer a good data type for the array that it creates. The data type is stored in a special dtype metadata object  \n• In addition to np.array, there are a number of other functions for creating new arrays. As examples, zeros and ones create arrays of 0sor 1s, respectively, with a given length or shape. empty creates an array without initializing its values to any particular value  \nArray creation functions  \nNumPy data types  \n• You can explicitly convert or cast an array from one dtype to another using ndarray’s astype method  \n• If you have an array of strings representing numbers, you can use astype to convert them to numeric form  \nArithmetic with NumPy Arrays  \n• Arrays are important because they enable you to express batch operations on data without writing any for loops. NumPy users call this vectorization. Any arithmetic operations between equal-size arrays applies the operation element-wise","cbCaimITrJbjnJia","https://ap.wps.com/l/cbCaimITrJbjnJia","pdf",933828,31,"English","# The main areas of NumPy functionality\n## The ndarray: multidimensional array object\n## Creating ndarrays\n## NumPy data types\n## Arithmetic with NumPy arrays","[{\"question\":\"What are the main functionality areas introduced in NumPy basics?\",\"answer\":\"The lecture highlights fast vectorized array operations for data munging, subsetting, filtering, transformation, common array algorithms (sorting, unique, set operations), descriptive statistics and aggregation, and data alignment for merging and joining heterogeneous datasets.\"},{\"question\":\"What is an ndarray and what information does it store?\",\"answer\":\"An ndarray is NumPy’s N-dimensional array object designed for large datasets. It stores a shape (size of each dimension) and dtype metadata describing the element data type.\"},{\"question\":\"How can you create and type-convert NumPy arrays?\",\"answer\":\"Use np.array to create arrays from sequence-like inputs, while zeros, ones, and empty provide alternative creation options. Convert or cast dtypes with ndarray’s astype, including turning arrays of numeric strings into numeric form.\"}]","Lecture 3 - NumPy basics - Arrays and Vectorized Computation | PDF",78,[146,150,153,157],{"page_no":22,"url":147,"width":148,"height":149},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-09/955781404770437af9fecb2fd3ebd751.webp",983,552,{"page_no":26,"url":151,"width":152,"height":149},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-09/4593c87300b4bd545e570471cd73a656.webp",982,{"page_no":30,"url":154,"width":155,"height":156},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-09/4e5ff12a96f2625839218c6c515dd2d3.webp",981,551,{"page_no":33,"url":158,"width":159,"height":156},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-09/ab0fd63db92f1dd4966e401aa1bdf4f1.webp",980,{"list":161,"token":11},[162,168,174,179,185,191,197,203,209,215],{"doc_id":163,"doc_title":164,"file_type":137,"home_preview_img_url":165,"slug":166,"view_count":115,"category_name":29,"create_tm":167},685801,"NumPy User Guide - Release 1.16.6 - An introductory overview","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230000213033/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796108879&Signature=fjRU%2FO5p9GVUmgWn9I%2FN8clY41M%3D","numpy-user-guide-release-1166-an-introductory-overview",1794018701,{"doc_id":169,"doc_title":170,"file_type":137,"home_preview_img_url":171,"slug":172,"view_count":97,"category_name":29,"create_tm":173},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=1796108879&Signature=WJGutq8YVYrta2iU6yWig7gxHeQ%3D","numpy-array-chapter-11-informatics-practices",1794018711,{"doc_id":175,"doc_title":176,"file_type":137,"home_preview_img_url":177,"slug":178,"view_count":33,"category_name":29,"create_tm":80},685809,"NumPy and Image Processing Primer Discussion - 1","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230000213275/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796108879&Signature=ZAlhXvHZv0yL7B8o0N4GMmwVlzE%3D","numpy-and-image-processing-primer-discussion-1",{"doc_id":180,"doc_title":181,"file_type":137,"home_preview_img_url":182,"slug":183,"view_count":102,"category_name":29,"create_tm":184},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=1796108879&Signature=q%2BRKb2CBpSvf%2FG1hww8hb%2BzvLdM%3D","numpy-and-scipy-tutorial-installation-and-array-fundamentals",1794018485,{"doc_id":186,"doc_title":187,"file_type":137,"home_preview_img_url":188,"slug":189,"view_count":102,"category_name":29,"create_tm":190},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=1796108879&Signature=%2BvBuk71L6vYZEchgw%2F2aR1o5BR0%3D","numpy-reference-release-1130-array-objects",1794018712,{"doc_id":192,"doc_title":193,"file_type":137,"home_preview_img_url":194,"slug":195,"view_count":115,"category_name":29,"create_tm":196},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=1796108879&Signature=skLDdK%2BE0vW%2BtmCC4c41%2BhoQElk%3D","numpy-user-guide-release-230",1794018702,{"doc_id":198,"doc_title":199,"file_type":137,"home_preview_img_url":200,"slug":201,"view_count":106,"category_name":29,"create_tm":202},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=1796108879&Signature=YIHbb7UhztOrsae9atk441vlcB8%3D","python-arrays-learn-how-to-create-access-and-modify-lists",1794018478,{"doc_id":204,"doc_title":205,"file_type":137,"home_preview_img_url":206,"slug":207,"view_count":33,"category_name":29,"create_tm":208},697965,"Arrays Made Easy - An Introduction to Arrays and Array Processing - SUGI 30 Tutorials","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230010146275/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796108879&Signature=fTmh7lte7wcrorBZuhehWGR5y00%3D","arrays-made-easy-an-introduction-to-arrays-and-array-processing-sugi-30-tutorials",1794446535,{"doc_id":210,"doc_title":211,"file_type":137,"home_preview_img_url":212,"slug":213,"view_count":123,"category_name":29,"create_tm":214},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=1796108879&Signature=ZLHcK7rEotv7BENgptr86XgOJWI%3D","python-with-hermione-paper-os-323-unleash-your-inner-coding-witch-and-dragon",1793685716,{"doc_id":216,"doc_title":217,"file_type":137,"home_preview_img_url":218,"slug":219,"view_count":220,"category_name":29,"create_tm":221},417799,"PYTHON PROGRAMMING - R17A0554 - Lecture Notes - B.TECH III YEAR II SEM","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229922495571/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796108879&Signature=Og6Y6wRUrxIZN1LuSSyW47xph5g%3D","python-programming-r17a0554-lecture-notes-btech-iii-year-ii-sem",15,1790610657]