SlideShare a Scribd company logo
1 of 14
NumPy
NumPy is a Python package. It stands for 'Numerical
Python'. It is a library consisting of multidimensional
array objects and a collection of routines for
processing of array.
NumPy
Developed By- Jim Hugunin
Since- 2005
Why NumPy
 NumPy uses much less memory to store data.
 The NumPy arrays takes significantly less amount of memory as
compared to python lists.
 It also provides a mechanism of specifying the data types of the
contents, which allows further optimisation of the code
How to install NumPy in windows
py -m pip install numpy
 Open Command Prompt in windows
 Than set user account
 And run follow command ( When computer is connected to
internet )
How to use NumPy
import numpy as np
Shapes of Arrays in NumPy
 1 Dimension Array
 2 Dimension Array
 3 Dimension Array
1 Dimension Array
import numpy as np
A=np.array( [30,67,89] )
print(A)
Output:
[30,67,89]
2 Dimension Array
import numpy as np
A=np.array([
(30,67,89),
(30,67,89),
(30,67,89),
])
print(A)
Output: [(30 67 89)
(30 67 89)
(30 67 89)]
3 Dimension Array
import numpy as np
A=np.array([
[[1, 2,3],
[4, 5, 6]],
[[7, 8,9],
[10, 11, 12]]
])
print(A)
Output:
[
[[1, 2,3],
[4, 5, 6]],
[[7, 8,9],
[10, 11, 12]]
]
Array attributes in NumPy
import numpy as np
A=np.array( [30,67,89] )
print(A.ndim)
Output:
1
ndim-: This array attribute returns the number of array dimensions.
Array attributes in NumPy
import numpy as np
A=np.array( [
[30,67,89],
[38,27,89]
])
print(A.size)
Output:
6
size-: This array attribute returns the total number of elements of array
Array attributes in NumPy
import numpy as np
A=np.array( [
[30,67,89],
[38,27,89]
])
print(A.shape)
Output:
(2,3)
shape-: This array attribute returns a tuple consisting of array dimensions. It can
also be used to resize the array.
Array attributes in NumPy
import numpy as np
A=np.array( [
[30,67,89], [38,27,89], ])
A.shape = (3,2)
print(A)
Output:
[
[30,7],
[89,38],
[27,89]
]
Change array shape

More Related Content

What's hot

What's hot (20)

Intoduction to numpy
Intoduction to numpyIntoduction to numpy
Intoduction to numpy
 
Python programming : List and tuples
Python programming : List and tuplesPython programming : List and tuples
Python programming : List and tuples
 
Introduction to numpy
Introduction to numpyIntroduction to numpy
Introduction to numpy
 
Python NumPy Tutorial | NumPy Array | Edureka
Python NumPy Tutorial | NumPy Array | EdurekaPython NumPy Tutorial | NumPy Array | Edureka
Python NumPy Tutorial | NumPy Array | Edureka
 
NumPy.pptx
NumPy.pptxNumPy.pptx
NumPy.pptx
 
Numpy
NumpyNumpy
Numpy
 
Introduction to numpy Session 1
Introduction to numpy Session 1Introduction to numpy Session 1
Introduction to numpy Session 1
 
Python Functions
Python   FunctionsPython   Functions
Python Functions
 
Introduction to pandas
Introduction to pandasIntroduction to pandas
Introduction to pandas
 
Modules and packages in python
Modules and packages in pythonModules and packages in python
Modules and packages in python
 
Python: Modules and Packages
Python: Modules and PackagesPython: Modules and Packages
Python: Modules and Packages
 
Python Modules
Python ModulesPython Modules
Python Modules
 
Python Programming: Lists, Modules, Exceptions
Python Programming: Lists, Modules, ExceptionsPython Programming: Lists, Modules, Exceptions
Python Programming: Lists, Modules, Exceptions
 
Introduction to matplotlib
Introduction to matplotlibIntroduction to matplotlib
Introduction to matplotlib
 
List in Python
List in PythonList in Python
List in Python
 
Python Variable Types, List, Tuple, Dictionary
Python Variable Types, List, Tuple, DictionaryPython Variable Types, List, Tuple, Dictionary
Python Variable Types, List, Tuple, Dictionary
 
Python Libraries and Modules
Python Libraries and ModulesPython Libraries and Modules
Python Libraries and Modules
 
Python programming : Strings
Python programming : StringsPython programming : Strings
Python programming : Strings
 
Pandas
PandasPandas
Pandas
 
Python Pandas
Python PandasPython Pandas
Python Pandas
 

Similar to NumPy.pptx

NumPy.pptx Bachelor of Computer Application
NumPy.pptx Bachelor of Computer ApplicationNumPy.pptx Bachelor of Computer Application
NumPy.pptx Bachelor of Computer Applicationsharmavishal49202
 
Python 8416516 16 196 46 5163 51 63 51 6.pptx
Python 8416516 16 196 46 5163 51 63 51 6.pptxPython 8416516 16 196 46 5163 51 63 51 6.pptx
Python 8416516 16 196 46 5163 51 63 51 6.pptxChetanRaut43
 
Data Analyzing And Visualization Using Python.pptx
Data Analyzing And Visualization Using Python.pptxData Analyzing And Visualization Using Python.pptx
Data Analyzing And Visualization Using Python.pptxPoojaChavan51
 
Data Analysis in Python-NumPy
Data Analysis in Python-NumPyData Analysis in Python-NumPy
Data Analysis in Python-NumPyDevashish Kumar
 
NUMPY [Autosaved] .pptx
NUMPY [Autosaved]                    .pptxNUMPY [Autosaved]                    .pptx
NUMPY [Autosaved] .pptxcoolmanbalu123
 
Mastering Coding Assignments: Expert Help for Your Coding Assignment Needs
Mastering Coding Assignments: Expert Help for Your Coding Assignment NeedsMastering Coding Assignments: Expert Help for Your Coding Assignment Needs
Mastering Coding Assignments: Expert Help for Your Coding Assignment NeedsCoding Assignment Help
 
CAP776Numpy.ppt
CAP776Numpy.pptCAP776Numpy.ppt
CAP776Numpy.pptkdr52121
 
getting started with numpy and pandas.pptx
getting started with numpy and pandas.pptxgetting started with numpy and pandas.pptx
getting started with numpy and pandas.pptxworkvishalkumarmahat
 
Python for Machine Learning(MatPlotLib).pptx
Python for Machine Learning(MatPlotLib).pptxPython for Machine Learning(MatPlotLib).pptx
Python for Machine Learning(MatPlotLib).pptxDr. Amanpreet Kaur
 
Introduction to numpy.pptx
Introduction to numpy.pptxIntroduction to numpy.pptx
Introduction to numpy.pptxssuser0e701a
 
pythonlibrariesandmodules-210530042906.docx
pythonlibrariesandmodules-210530042906.docxpythonlibrariesandmodules-210530042906.docx
pythonlibrariesandmodules-210530042906.docxRameshMishra84
 

Similar to NumPy.pptx (20)

NumPy.pptx Bachelor of Computer Application
NumPy.pptx Bachelor of Computer ApplicationNumPy.pptx Bachelor of Computer Application
NumPy.pptx Bachelor of Computer Application
 
NumPy.pptx
NumPy.pptxNumPy.pptx
NumPy.pptx
 
Numpy.pptx
Numpy.pptxNumpy.pptx
Numpy.pptx
 
Python 8416516 16 196 46 5163 51 63 51 6.pptx
Python 8416516 16 196 46 5163 51 63 51 6.pptxPython 8416516 16 196 46 5163 51 63 51 6.pptx
Python 8416516 16 196 46 5163 51 63 51 6.pptx
 
Data Analyzing And Visualization Using Python.pptx
Data Analyzing And Visualization Using Python.pptxData Analyzing And Visualization Using Python.pptx
Data Analyzing And Visualization Using Python.pptx
 
Data Analysis in Python-NumPy
Data Analysis in Python-NumPyData Analysis in Python-NumPy
Data Analysis in Python-NumPy
 
NumPy.pptx
NumPy.pptxNumPy.pptx
NumPy.pptx
 
NUMPY [Autosaved] .pptx
NUMPY [Autosaved]                    .pptxNUMPY [Autosaved]                    .pptx
NUMPY [Autosaved] .pptx
 
Python for ML.pptx
Python for ML.pptxPython for ML.pptx
Python for ML.pptx
 
Mastering Coding Assignments: Expert Help for Your Coding Assignment Needs
Mastering Coding Assignments: Expert Help for Your Coding Assignment NeedsMastering Coding Assignments: Expert Help for Your Coding Assignment Needs
Mastering Coding Assignments: Expert Help for Your Coding Assignment Needs
 
DS LAB MANUAL.pdf
DS LAB MANUAL.pdfDS LAB MANUAL.pdf
DS LAB MANUAL.pdf
 
Python Finance
Python FinancePython Finance
Python Finance
 
CAP776Numpy (2).ppt
CAP776Numpy (2).pptCAP776Numpy (2).ppt
CAP776Numpy (2).ppt
 
CAP776Numpy.ppt
CAP776Numpy.pptCAP776Numpy.ppt
CAP776Numpy.ppt
 
getting started with numpy and pandas.pptx
getting started with numpy and pandas.pptxgetting started with numpy and pandas.pptx
getting started with numpy and pandas.pptx
 
Python for Machine Learning(MatPlotLib).pptx
Python for Machine Learning(MatPlotLib).pptxPython for Machine Learning(MatPlotLib).pptx
Python for Machine Learning(MatPlotLib).pptx
 
Introduction to numpy.pptx
Introduction to numpy.pptxIntroduction to numpy.pptx
Introduction to numpy.pptx
 
Demo1 use numpy
Demo1 use numpyDemo1 use numpy
Demo1 use numpy
 
pythonlibrariesandmodules-210530042906.docx
pythonlibrariesandmodules-210530042906.docxpythonlibrariesandmodules-210530042906.docx
pythonlibrariesandmodules-210530042906.docx
 
Numpy
NumpyNumpy
Numpy
 

Recently uploaded

SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting DataJhengPantaleon
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...Marc Dusseiller Dusjagr
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application ) Sakshi Ghasle
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentInMediaRes1
 
PSYCHIATRIC History collection FORMAT.pptx
PSYCHIATRIC   History collection FORMAT.pptxPSYCHIATRIC   History collection FORMAT.pptx
PSYCHIATRIC History collection FORMAT.pptxPoojaSen20
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Educationpboyjonauth
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991RKavithamani
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsanshu789521
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfchloefrazer622
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 
Micromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of PowdersMicromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of PowdersChitralekhaTherkar
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppCeline George
 

Recently uploaded (20)

SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application )
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media Component
 
PSYCHIATRIC History collection FORMAT.pptx
PSYCHIATRIC   History collection FORMAT.pptxPSYCHIATRIC   History collection FORMAT.pptx
PSYCHIATRIC History collection FORMAT.pptx
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha elections
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdf
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
 
Micromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of PowdersMicromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of Powders
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website App
 

NumPy.pptx

  • 1.
  • 2. NumPy NumPy is a Python package. It stands for 'Numerical Python'. It is a library consisting of multidimensional array objects and a collection of routines for processing of array.
  • 3. NumPy Developed By- Jim Hugunin Since- 2005
  • 4. Why NumPy  NumPy uses much less memory to store data.  The NumPy arrays takes significantly less amount of memory as compared to python lists.  It also provides a mechanism of specifying the data types of the contents, which allows further optimisation of the code
  • 5. How to install NumPy in windows py -m pip install numpy  Open Command Prompt in windows  Than set user account  And run follow command ( When computer is connected to internet )
  • 6. How to use NumPy import numpy as np
  • 7. Shapes of Arrays in NumPy  1 Dimension Array  2 Dimension Array  3 Dimension Array
  • 8. 1 Dimension Array import numpy as np A=np.array( [30,67,89] ) print(A) Output: [30,67,89]
  • 9. 2 Dimension Array import numpy as np A=np.array([ (30,67,89), (30,67,89), (30,67,89), ]) print(A) Output: [(30 67 89) (30 67 89) (30 67 89)]
  • 10. 3 Dimension Array import numpy as np A=np.array([ [[1, 2,3], [4, 5, 6]], [[7, 8,9], [10, 11, 12]] ]) print(A) Output: [ [[1, 2,3], [4, 5, 6]], [[7, 8,9], [10, 11, 12]] ]
  • 11. Array attributes in NumPy import numpy as np A=np.array( [30,67,89] ) print(A.ndim) Output: 1 ndim-: This array attribute returns the number of array dimensions.
  • 12. Array attributes in NumPy import numpy as np A=np.array( [ [30,67,89], [38,27,89] ]) print(A.size) Output: 6 size-: This array attribute returns the total number of elements of array
  • 13. Array attributes in NumPy import numpy as np A=np.array( [ [30,67,89], [38,27,89] ]) print(A.shape) Output: (2,3) shape-: This array attribute returns a tuple consisting of array dimensions. It can also be used to resize the array.
  • 14. Array attributes in NumPy import numpy as np A=np.array( [ [30,67,89], [38,27,89], ]) A.shape = (3,2) print(A) Output: [ [30,7], [89,38], [27,89] ] Change array shape