SlideShare a Scribd company logo
zekeLabs
Essential NumPy
Learning made Simpler !
www.zekeLabs.com
Agenda
● Introduction to NumPy
● Initialization & Creation of NumPy
● Accessing
● Concatenation
● Splitting
● Shape,Size & ndim
● Reshaping
● Changing Dimension
● NumPy Utility Functions
● Broadcasting
Introduction to NumPy
● N-dim array for fast mathematical calculation
● Homogeneous data structure
● Written in C/C++
● Scikit-learn is implemented using this
● Python List is generalized & thus slow
Initialization
● Size is important parameter for all of them
● Zeros - initialized with zero values
● Ones - initialized with one values
● Empty - uninitialized array ( contains garbage value )
● Full - initialized with value passed
● Random - different methods to initialize random values
● Lin_space - generate equally spaced numbers between start & stop values
● Ones_like - based on passed numpy object, size is allocated with all one
Initialization
Initialization
Initialization
Access
● Very similar to that of accessing list
Concatenation
● Axis = 0 means vertical
● Axis = 1 means horizontal
● Concatenate - join numpy array along provided axis
● Hstack - joining numpy array horizontally
● Vstack - joining numpy array vertically
● For any of these operations to happen, the joining edge should be of shape
size. 3 X 2 matrix hstacks with 3 X 5
Concatenation
Splitting
● Splits array into subarrays
● Split - Splits the array as per axis mentioned
● Hsplit - This splits the horizontal axis
● Vsplit - This splits the vertical axis
Splitting
Shape, Size, ndim
Reshaping
● Learning algorithms expects data in certain shape & dimension
● Using reshaping utility we can convert data into desired shape.
● But, the desired transformation will also be of same size
● Adding 1 dimensions will not alter data size
Reshaping
Adding Dimension
● Learning algorithms consumes data in
two dimension
● Below, we are converting 1-D array to 2-D
Adding Dimension
Utility Functions
● NumPy has a huge list of mathematical functions to make implementing
machine learning algorithms very easy
● A few of them are
● Max
● Min
● Mean
● Std
● Cov
● Cumprod
● all
● any
● Mean
● dot
● multiply
● sqrt
Broadcasting
● Single row matrix are known as vectors
● Broadcasting is a technique using which NumPy does mathematical
computation on data of different shapes & dimension
● We might need to reshape the data sometimes to enable broadcasting
Broadcasting
Thank You !!!
Visit : www.zekeLabs.com for more details
THANK YOU
Let us know how can we help your organization to Upskill the
employees to stay updated in the ever-evolving IT Industry.
Get in touch:
www.zekeLabs.com | +91-8095465880 | info@zekeLabs.com

More Related Content

What's hot (20)

PPTX
Data Science With Python | Python For Data Science | Python Data Science Cour...
Simplilearn
 
PDF
pandas - Python Data Analysis
Andrew Henshaw
 
PDF
Deep Dive into Hyperparameter Tuning
Shubhmay Potdar
 
PPTX
Introduction to numpy
Gaurav Aggarwal
 
PPTX
Basic Concepts of OOPs (Object Oriented Programming in Java)
Michelle Anne Meralpis
 
PDF
Introduction to Data Science and Analytics
Srinath Perera
 
PPTX
Python SQite3 database Tutorial | SQlite Database
ElangovanTechNotesET
 
PDF
Logistic regression in Machine Learning
Kuppusamy P
 
PPTX
What is Machine Learning
Bhaskara Reddy Sannapureddy
 
PPTX
Introduction to Keras
John Ramey
 
PPTX
Data Mining: Outlier analysis
DataminingTools Inc
 
PPTX
Unit 1 - R Programming (Part 2).pptx
Malla Reddy University
 
PDF
WT(WEB TECHNOLOGY) previous year question papers
HemaArora2
 
PPTX
Interface in java
PhD Research Scholar
 
PPTX
Python Scipy Numpy
Girish Khanzode
 
PPTX
Design pattern-presentation
Rana Muhammad Asif
 
PDF
Cross-validation Tutorial: What, how and which?
Pradeep Redddy Raamana
 
PPT
Software process and project metrics
Indu Sharma Bhardwaj
 
Data Science With Python | Python For Data Science | Python Data Science Cour...
Simplilearn
 
pandas - Python Data Analysis
Andrew Henshaw
 
Deep Dive into Hyperparameter Tuning
Shubhmay Potdar
 
Introduction to numpy
Gaurav Aggarwal
 
Basic Concepts of OOPs (Object Oriented Programming in Java)
Michelle Anne Meralpis
 
Introduction to Data Science and Analytics
Srinath Perera
 
Python SQite3 database Tutorial | SQlite Database
ElangovanTechNotesET
 
Logistic regression in Machine Learning
Kuppusamy P
 
What is Machine Learning
Bhaskara Reddy Sannapureddy
 
Introduction to Keras
John Ramey
 
Data Mining: Outlier analysis
DataminingTools Inc
 
Unit 1 - R Programming (Part 2).pptx
Malla Reddy University
 
WT(WEB TECHNOLOGY) previous year question papers
HemaArora2
 
Interface in java
PhD Research Scholar
 
Python Scipy Numpy
Girish Khanzode
 
Design pattern-presentation
Rana Muhammad Asif
 
Cross-validation Tutorial: What, how and which?
Pradeep Redddy Raamana
 
Software process and project metrics
Indu Sharma Bhardwaj
 

Similar to Essential NumPy (20)

PDF
NumPy__data__anlysis___using__python.pdf
goldenflower34
 
PPTX
Data Analysis in Python-NumPy
Devashish Kumar
 
PPTX
Data Preprocessing
zekeLabs Technologies
 
PDF
Python for Computer Vision - Revision
Ahmed Gad
 
PDF
Data science
Purna Chander
 
PPT
Complexity
Malainine Zaid
 
PDF
Unit 6-Introduction of Python Libraries.pdf
Harsha Patil
 
PPTX
Python for ML.pptx
Dr. Amanpreet Kaur
 
PDF
Apache Giraph
Ahmet Emre Aladağ
 
PDF
Machine learning
Mike Martinez
 
PDF
Getting Started with Calc Manager for HFM
Alithya
 
DOCX
Machine learning Experiments report
AlmkdadAli
 
PPTX
Google mesa
Sameer Tiwari
 
PDF
Distributed Machine Learning and the Parameter Server
ZandruYamanay
 
PDF
Introduction to Machine Learning with Spark
datamantra
 
PPT
Python
Chetan Khanzode
 
PPTX
In-class slides with activities
SERC at Carleton College
 
PDF
CSSC ML Workshop
GDSC UofT Mississauga
 
PPTX
Distributed Machine Learning and AI.pptx
sinunambiar4
 
PPTX
SKLearn Workshop.pptx
fsxflyer789Productio
 
NumPy__data__anlysis___using__python.pdf
goldenflower34
 
Data Analysis in Python-NumPy
Devashish Kumar
 
Data Preprocessing
zekeLabs Technologies
 
Python for Computer Vision - Revision
Ahmed Gad
 
Data science
Purna Chander
 
Complexity
Malainine Zaid
 
Unit 6-Introduction of Python Libraries.pdf
Harsha Patil
 
Python for ML.pptx
Dr. Amanpreet Kaur
 
Apache Giraph
Ahmet Emre Aladağ
 
Machine learning
Mike Martinez
 
Getting Started with Calc Manager for HFM
Alithya
 
Machine learning Experiments report
AlmkdadAli
 
Google mesa
Sameer Tiwari
 
Distributed Machine Learning and the Parameter Server
ZandruYamanay
 
Introduction to Machine Learning with Spark
datamantra
 
In-class slides with activities
SERC at Carleton College
 
CSSC ML Workshop
GDSC UofT Mississauga
 
Distributed Machine Learning and AI.pptx
sinunambiar4
 
SKLearn Workshop.pptx
fsxflyer789Productio
 
Ad

More from zekeLabs Technologies (20)

PPTX
Webinar - Build Cloud-native platform using Docker, Kubernetes, Prometheus, I...
zekeLabs Technologies
 
PPTX
Design Patterns for Pods and Containers in Kubernetes - Webinar by zekeLabs
zekeLabs Technologies
 
PDF
[Webinar] Following the Agile Footprint - zekeLabs
zekeLabs Technologies
 
PPTX
Machine learning at scale - Webinar By zekeLabs
zekeLabs Technologies
 
PDF
A curtain-raiser to the container world Docker & Kubernetes
zekeLabs Technologies
 
PPTX
Docker - A curtain raiser to the Container world
zekeLabs Technologies
 
PPTX
Serverless and cloud computing
zekeLabs Technologies
 
PPTX
02 terraform core concepts
zekeLabs Technologies
 
PPTX
08 Terraform: Provisioners
zekeLabs Technologies
 
PPTX
Outlier detection handling
zekeLabs Technologies
 
PPTX
Nearest neighbors
zekeLabs Technologies
 
PPTX
Naive bayes
zekeLabs Technologies
 
PPTX
Master guide to become a data scientist
zekeLabs Technologies
 
PPTX
Linear regression
zekeLabs Technologies
 
PPTX
Linear models of classification
zekeLabs Technologies
 
PPTX
Grid search, pipeline, featureunion
zekeLabs Technologies
 
PPTX
Feature selection
zekeLabs Technologies
 
PPTX
Ensemble methods
zekeLabs Technologies
 
PPTX
Dimentionality reduction
zekeLabs Technologies
 
Webinar - Build Cloud-native platform using Docker, Kubernetes, Prometheus, I...
zekeLabs Technologies
 
Design Patterns for Pods and Containers in Kubernetes - Webinar by zekeLabs
zekeLabs Technologies
 
[Webinar] Following the Agile Footprint - zekeLabs
zekeLabs Technologies
 
Machine learning at scale - Webinar By zekeLabs
zekeLabs Technologies
 
A curtain-raiser to the container world Docker & Kubernetes
zekeLabs Technologies
 
Docker - A curtain raiser to the Container world
zekeLabs Technologies
 
Serverless and cloud computing
zekeLabs Technologies
 
02 terraform core concepts
zekeLabs Technologies
 
08 Terraform: Provisioners
zekeLabs Technologies
 
Outlier detection handling
zekeLabs Technologies
 
Nearest neighbors
zekeLabs Technologies
 
Master guide to become a data scientist
zekeLabs Technologies
 
Linear regression
zekeLabs Technologies
 
Linear models of classification
zekeLabs Technologies
 
Grid search, pipeline, featureunion
zekeLabs Technologies
 
Feature selection
zekeLabs Technologies
 
Ensemble methods
zekeLabs Technologies
 
Dimentionality reduction
zekeLabs Technologies
 
Ad

Recently uploaded (20)

PDF
Building Real-Time Digital Twins with IBM Maximo & ArcGIS Indoors
Safe Software
 
PDF
Smart Trailers 2025 Update with History and Overview
Paul Menig
 
PPT
Interview paper part 3, It is based on Interview Prep
SoumyadeepGhosh39
 
PDF
Newgen Beyond Frankenstein_Build vs Buy_Digital_version.pdf
darshakparmar
 
PPTX
AUTOMATION AND ROBOTICS IN PHARMA INDUSTRY.pptx
sameeraaabegumm
 
PPTX
OpenID AuthZEN - Analyst Briefing July 2025
David Brossard
 
PDF
DevBcn - Building 10x Organizations Using Modern Productivity Metrics
Justin Reock
 
PDF
Empower Inclusion Through Accessible Java Applications
Ana-Maria Mihalceanu
 
PDF
SWEBOK Guide and Software Services Engineering Education
Hironori Washizaki
 
PDF
Python basic programing language for automation
DanialHabibi2
 
PDF
Blockchain Transactions Explained For Everyone
CIFDAQ
 
PPTX
✨Unleashing Collaboration: Salesforce Channels & Community Power in Patna!✨
SanjeetMishra29
 
PPTX
UiPath Academic Alliance Educator Panels: Session 2 - Business Analyst Content
DianaGray10
 
PPTX
MSP360 Backup Scheduling and Retention Best Practices.pptx
MSP360
 
PDF
Exolore The Essential AI Tools in 2025.pdf
Srinivasan M
 
PDF
Chris Elwell Woburn, MA - Passionate About IT Innovation
Chris Elwell Woburn, MA
 
PDF
Reverse Engineering of Security Products: Developing an Advanced Microsoft De...
nwbxhhcyjv
 
PPTX
WooCommerce Workshop: Bring Your Laptop
Laura Hartwig
 
PDF
SFWelly Summer 25 Release Highlights July 2025
Anna Loughnan Colquhoun
 
PDF
"AI Transformation: Directions and Challenges", Pavlo Shaternik
Fwdays
 
Building Real-Time Digital Twins with IBM Maximo & ArcGIS Indoors
Safe Software
 
Smart Trailers 2025 Update with History and Overview
Paul Menig
 
Interview paper part 3, It is based on Interview Prep
SoumyadeepGhosh39
 
Newgen Beyond Frankenstein_Build vs Buy_Digital_version.pdf
darshakparmar
 
AUTOMATION AND ROBOTICS IN PHARMA INDUSTRY.pptx
sameeraaabegumm
 
OpenID AuthZEN - Analyst Briefing July 2025
David Brossard
 
DevBcn - Building 10x Organizations Using Modern Productivity Metrics
Justin Reock
 
Empower Inclusion Through Accessible Java Applications
Ana-Maria Mihalceanu
 
SWEBOK Guide and Software Services Engineering Education
Hironori Washizaki
 
Python basic programing language for automation
DanialHabibi2
 
Blockchain Transactions Explained For Everyone
CIFDAQ
 
✨Unleashing Collaboration: Salesforce Channels & Community Power in Patna!✨
SanjeetMishra29
 
UiPath Academic Alliance Educator Panels: Session 2 - Business Analyst Content
DianaGray10
 
MSP360 Backup Scheduling and Retention Best Practices.pptx
MSP360
 
Exolore The Essential AI Tools in 2025.pdf
Srinivasan M
 
Chris Elwell Woburn, MA - Passionate About IT Innovation
Chris Elwell Woburn, MA
 
Reverse Engineering of Security Products: Developing an Advanced Microsoft De...
nwbxhhcyjv
 
WooCommerce Workshop: Bring Your Laptop
Laura Hartwig
 
SFWelly Summer 25 Release Highlights July 2025
Anna Loughnan Colquhoun
 
"AI Transformation: Directions and Challenges", Pavlo Shaternik
Fwdays
 

Essential NumPy

  • 1. zekeLabs Essential NumPy Learning made Simpler ! www.zekeLabs.com
  • 2. Agenda ● Introduction to NumPy ● Initialization & Creation of NumPy ● Accessing ● Concatenation ● Splitting ● Shape,Size & ndim ● Reshaping ● Changing Dimension ● NumPy Utility Functions ● Broadcasting
  • 3. Introduction to NumPy ● N-dim array for fast mathematical calculation ● Homogeneous data structure ● Written in C/C++ ● Scikit-learn is implemented using this ● Python List is generalized & thus slow
  • 4. Initialization ● Size is important parameter for all of them ● Zeros - initialized with zero values ● Ones - initialized with one values ● Empty - uninitialized array ( contains garbage value ) ● Full - initialized with value passed ● Random - different methods to initialize random values ● Lin_space - generate equally spaced numbers between start & stop values ● Ones_like - based on passed numpy object, size is allocated with all one
  • 8. Access ● Very similar to that of accessing list
  • 9. Concatenation ● Axis = 0 means vertical ● Axis = 1 means horizontal ● Concatenate - join numpy array along provided axis ● Hstack - joining numpy array horizontally ● Vstack - joining numpy array vertically ● For any of these operations to happen, the joining edge should be of shape size. 3 X 2 matrix hstacks with 3 X 5
  • 11. Splitting ● Splits array into subarrays ● Split - Splits the array as per axis mentioned ● Hsplit - This splits the horizontal axis ● Vsplit - This splits the vertical axis
  • 14. Reshaping ● Learning algorithms expects data in certain shape & dimension ● Using reshaping utility we can convert data into desired shape. ● But, the desired transformation will also be of same size ● Adding 1 dimensions will not alter data size
  • 16. Adding Dimension ● Learning algorithms consumes data in two dimension ● Below, we are converting 1-D array to 2-D
  • 18. Utility Functions ● NumPy has a huge list of mathematical functions to make implementing machine learning algorithms very easy ● A few of them are ● Max ● Min ● Mean ● Std ● Cov ● Cumprod ● all ● any ● Mean ● dot ● multiply ● sqrt
  • 19. Broadcasting ● Single row matrix are known as vectors ● Broadcasting is a technique using which NumPy does mathematical computation on data of different shapes & dimension ● We might need to reshape the data sometimes to enable broadcasting
  • 22. Visit : www.zekeLabs.com for more details THANK YOU Let us know how can we help your organization to Upskill the employees to stay updated in the ever-evolving IT Industry. Get in touch: www.zekeLabs.com | +91-8095465880 | [email protected]