SlideShare a Scribd company logo
1 of 31
Outline
❑ Jupyter Notebook
❑ Numpy
❑ Importing Package
❑ Creating an Array
❑ Generating arrays using built-in functions
❑ Shape and Reshape an Array
❑ Numpy Operations
❑ Access Elements from an Array
❑ Advantages of Numpy
❑ Matrix operations
Jupyter Notebook
❑ Jupyter Notebook is a web-based interactive IDE for
Executing the Python.
❑ Install the Anaconda Navigator to your Machine and
open the Navigator.
Jupyter Notebook
❑ Launch the Jupyter Notebook; once Launch means (it
will take some time).
❑ Open the Jupyter Notebook (Type Jupyter Notebook in
Start Menu Search)
Importing Package
❑Numpy standards for Numerical Python
❑It is mainly used for handling the mathematical
operations.
❑Import the Numpy packages using import command
Package Name Alias Name of Numpy
Create an Array
❑Collection of ordered data elements of basic data types
❑Syntax: np.array(object)
Array List
Cont…
❑It handles different data types entries including integer,
float, string and so on.
int String
Run Time Inputs
number_list = [] n = int(input("Enter the list size "))
print("n")
for i in range(0, n):
print("Enter number at index", i, )
item = int(input())
number_list.append(item)
print("User list is ", number_list)
Generate arrays using linspace
❑np.linspace()-returns equally spaced numbers within the
given range based on the sample number
❑Syntax:
np.linspace(start,stop,num)
❑start -start of interval range
❑stop -end of interval range
❑num-number of samples to be generated
Generate arrays using arange()
❑np.arange()-returns equally spaced numbers with in the
given range based on step size
❑Syntax:
np.arange(start,stop,step)
❑start -start of interval range
❑stop -end of interval range
❑step -step size of interval
❑Generate an array with start=1and stop=100 by specifying
step=2
Generate arrays using zeros()
❑np.zeros()-returns an array of given shape and type
filled with zeros
❑Syntax:
np.zeros(shape,dtype)
❑shape -integer or sequence of integers
❑dtype-data type (default: float)
1-D
2-D
Generate arrays using ones()
❑np.ones()-returns an array of given shape and type
filled with ones
❑Syntax:
np.ones(shape,dtype)
❑shape -integer or sequence of integers
❑dtype-data type (default: float)
1-D 2-D
Generate arrays using eye()
❑np.eye()-returns an array of given shape and diagonals
are filled with ones and rest of the diagonals are filled with
zeros.
❑Syntax:
np.eye(shape)
Generate arrays using random.rand()
❑np.random.rand()-returns an array of given shape filled
with random values
❑Syntax: numpy.random.rand(shape)
❑shape -integer or sequence of integers
❑The range of random number should be between 0-1
1-D
2-D
Shape an array
❑np.shape()-returns dimension of an array
❑Syntax: np.shape(var)
1-D 2-D
❑In 1-D, return shape as 5
❑In 2-D, will return 2rows and 3 columns.
Reshape an array
❑reshape()-returns an array to new shape without
changing its data
❑Syntax: reshape(dimension)
Numpy addition
❑np.sum()-returns sum of all array elements
❑Syntax: np.sum(array,axis)
❑array() –input array
❑axis() –axis along which sum should be calculated
❑If axis= None ; calculate overall sum
Numpy addition
❑if axis=0; calculate sum along with column wise
❑If axis=1; calculate sum along with row wise
Column wise sum Row wise sum
Numpy addition
❑np.add()-performs element wise addition between two
arrays
❑Syntax: np.add(array_1,array_2)
❑Create two arrays a and b
Output
Numpy subtraction
❑np.subtract()-performs element wise subtraction between
two arrays
❑Syntax: np.subtract(array_1,array_2)
❑Create two arrays a and b
Output
Numpy multiply
❑np.multiply()-performs element wise multiplication
between two arrays
❑Syntax: np.multiply(array_1,array_2)
❑Create two arrays a and b
Output
Numpy divide
❑np.divide()-performs element wise divide operation
between two arrays
❑Syntax: np.divide(array_1,array_2)
❑Create two arrays a and b
Output
Numpy remainder
❑np.remainder()-performs element wise remainder
between two arrays
❑Syntax: np.remainder(array_1,array_2)
❑Create two arrays a and b
Output
Accessing components of an array
❑Components of an array can be accessed using index
number
Subset of arrays
❖Subset a 2x2 array from the original
array m
❖Consider the first two rows and
columns from m
❖Print subset array sub
Subset of arrays
❖Here the value 1should be updated to 12
❖Print the updated array
❖Modifying the subset will automatically update the
original array also
Transpose of an array
np.transpose()- permute the dimensions of array
❑Syntax: np.transpose(array)
Output
Advantages of Numpy
❑timeit module can be used to measure the execution time
for snippets of code
❑Comparing the processing speed of a list and an array
using an addition operation
List Array
❑Creating a list ❑Creating a array
Create a Matrix
❑matrix()- returns a matrix from an array type object or
string of data
❑Syntax: np.matrix(data)
❑shape- returns number of rows and columns from a
matrix
❑shape[0]- returns the no. of row
❑shape[1]-returns the no. of columns.
❑size()- returns total no of elements.
Modifying matrix using insert()
❑insert()- adds values at a given position and axis in a
matrix
❑Syntax: np.insert(matrix, obj, values, axis)
❑marix- input matrix
❑obj- index position
❑values-matrix of values to be inserted
❑axis- axis=0- row insert otherwise- column wise insertion
Matrix Operations
Row Insertion Column Insertion
S.
No.
Function Description
1. np.add(M1,M2) Performs element wise addition between
two matrix
2. np.subtract(M1,M
2)
Performs element wise subtraction between
two matrix
3. np.dot(M1,M2) Performs element wise multiplication
between two matrix
4. np.divide(M1,M2) Performs element wise division between
two matrix
Any Queries ?

More Related Content

Similar to Numpy_defintion_description_usage_examples.pptx

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
 
Essential numpy before you start your Machine Learning journey in python.pdf
Essential numpy before you start your Machine Learning journey in python.pdfEssential numpy before you start your Machine Learning journey in python.pdf
Essential numpy before you start your Machine Learning journey in python.pdfSmrati Kumar Katiyar
 
Algorithms with-java-advanced-1.0
Algorithms with-java-advanced-1.0Algorithms with-java-advanced-1.0
Algorithms with-java-advanced-1.0BG Java EE Course
 
Arrays with Numpy, Computer Graphics
Arrays with Numpy, Computer GraphicsArrays with Numpy, Computer Graphics
Arrays with Numpy, Computer GraphicsPrabu U
 
Arrays_in_c++.pptx
Arrays_in_c++.pptxArrays_in_c++.pptx
Arrays_in_c++.pptxMrMaster11
 
arraycreation.pptx
arraycreation.pptxarraycreation.pptx
arraycreation.pptxsathya930629
 
Python - Numpy/Pandas/Matplot Machine Learning Libraries
Python - Numpy/Pandas/Matplot Machine Learning LibrariesPython - Numpy/Pandas/Matplot Machine Learning Libraries
Python - Numpy/Pandas/Matplot Machine Learning LibrariesAndrew Ferlitsch
 
ARRAY OPERATIONS.pptx
ARRAY OPERATIONS.pptxARRAY OPERATIONS.pptx
ARRAY OPERATIONS.pptxDarellMuchoko
 
Matplotlib adalah pustaka plotting 2D Python yang menghasilkan gambar berkual...
Matplotlib adalah pustaka plotting 2D Python yang menghasilkan gambar berkual...Matplotlib adalah pustaka plotting 2D Python yang menghasilkan gambar berkual...
Matplotlib adalah pustaka plotting 2D Python yang menghasilkan gambar berkual...HendraPurnama31
 
R programming slides
R  programming slidesR  programming slides
R programming slidesPankaj Saini
 
L 5 Numpy final ppt kirti.pptx
L 5 Numpy final ppt kirti.pptxL 5 Numpy final ppt kirti.pptx
L 5 Numpy final ppt kirti.pptxKirti Verma
 
python-numpyandpandas-170922144956 (1).pptx
python-numpyandpandas-170922144956 (1).pptxpython-numpyandpandas-170922144956 (1).pptx
python-numpyandpandas-170922144956 (1).pptxAkashgupta517936
 
Data Analysis in Python-NumPy
Data Analysis in Python-NumPyData Analysis in Python-NumPy
Data Analysis in Python-NumPyDevashish Kumar
 

Similar to Numpy_defintion_description_usage_examples.pptx (20)

NumPy.pptx
NumPy.pptxNumPy.pptx
NumPy.pptx
 
NUMPY
NUMPY NUMPY
NUMPY
 
PPS-UNIT5.ppt
PPS-UNIT5.pptPPS-UNIT5.ppt
PPS-UNIT5.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
 
numpy.pdf
numpy.pdfnumpy.pdf
numpy.pdf
 
Essential numpy before you start your Machine Learning journey in python.pdf
Essential numpy before you start your Machine Learning journey in python.pdfEssential numpy before you start your Machine Learning journey in python.pdf
Essential numpy before you start your Machine Learning journey in python.pdf
 
Algorithms with-java-advanced-1.0
Algorithms with-java-advanced-1.0Algorithms with-java-advanced-1.0
Algorithms with-java-advanced-1.0
 
Arrays with Numpy, Computer Graphics
Arrays with Numpy, Computer GraphicsArrays with Numpy, Computer Graphics
Arrays with Numpy, Computer Graphics
 
Arrays_in_c++.pptx
Arrays_in_c++.pptxArrays_in_c++.pptx
Arrays_in_c++.pptx
 
arraycreation.pptx
arraycreation.pptxarraycreation.pptx
arraycreation.pptx
 
Python - Numpy/Pandas/Matplot Machine Learning Libraries
Python - Numpy/Pandas/Matplot Machine Learning LibrariesPython - Numpy/Pandas/Matplot Machine Learning Libraries
Python - Numpy/Pandas/Matplot Machine Learning Libraries
 
ARRAY OPERATIONS.pptx
ARRAY OPERATIONS.pptxARRAY OPERATIONS.pptx
ARRAY OPERATIONS.pptx
 
Numpy
NumpyNumpy
Numpy
 
Matplotlib adalah pustaka plotting 2D Python yang menghasilkan gambar berkual...
Matplotlib adalah pustaka plotting 2D Python yang menghasilkan gambar berkual...Matplotlib adalah pustaka plotting 2D Python yang menghasilkan gambar berkual...
Matplotlib adalah pustaka plotting 2D Python yang menghasilkan gambar berkual...
 
R programming slides
R  programming slidesR  programming slides
R programming slides
 
Python programming : Arrays
Python programming : ArraysPython programming : Arrays
Python programming : Arrays
 
L 5 Numpy final ppt kirti.pptx
L 5 Numpy final ppt kirti.pptxL 5 Numpy final ppt kirti.pptx
L 5 Numpy final ppt kirti.pptx
 
python-numpyandpandas-170922144956 (1).pptx
python-numpyandpandas-170922144956 (1).pptxpython-numpyandpandas-170922144956 (1).pptx
python-numpyandpandas-170922144956 (1).pptx
 
iPython
iPythoniPython
iPython
 
Data Analysis in Python-NumPy
Data Analysis in Python-NumPyData Analysis in Python-NumPy
Data Analysis in Python-NumPy
 

More from VGaneshKarthikeyan

Unit III Part I_Opertaor_Overloading.pptx
Unit III Part I_Opertaor_Overloading.pptxUnit III Part I_Opertaor_Overloading.pptx
Unit III Part I_Opertaor_Overloading.pptxVGaneshKarthikeyan
 
Linear_discriminat_analysis_in_Machine_Learning.pptx
Linear_discriminat_analysis_in_Machine_Learning.pptxLinear_discriminat_analysis_in_Machine_Learning.pptx
Linear_discriminat_analysis_in_Machine_Learning.pptxVGaneshKarthikeyan
 
K-Mean clustering_Introduction_Applications.pptx
K-Mean clustering_Introduction_Applications.pptxK-Mean clustering_Introduction_Applications.pptx
K-Mean clustering_Introduction_Applications.pptxVGaneshKarthikeyan
 
Refined_Lecture-14-Linear Algebra-Review.ppt
Refined_Lecture-14-Linear Algebra-Review.pptRefined_Lecture-14-Linear Algebra-Review.ppt
Refined_Lecture-14-Linear Algebra-Review.pptVGaneshKarthikeyan
 
randomwalks_states_figures_events_happenings.ppt
randomwalks_states_figures_events_happenings.pptrandomwalks_states_figures_events_happenings.ppt
randomwalks_states_figures_events_happenings.pptVGaneshKarthikeyan
 
stochasticmodellinganditsapplications.ppt
stochasticmodellinganditsapplications.pptstochasticmodellinganditsapplications.ppt
stochasticmodellinganditsapplications.pptVGaneshKarthikeyan
 
1.10 Tuples_sets_usage_applications_advantages.pptx
1.10 Tuples_sets_usage_applications_advantages.pptx1.10 Tuples_sets_usage_applications_advantages.pptx
1.10 Tuples_sets_usage_applications_advantages.pptxVGaneshKarthikeyan
 
Neural_Networks_scalability_consntency.ppt
Neural_Networks_scalability_consntency.pptNeural_Networks_scalability_consntency.ppt
Neural_Networks_scalability_consntency.pptVGaneshKarthikeyan
 
Lecture-4-Linear Regression-Gradient Descent Solution.ppt
Lecture-4-Linear Regression-Gradient Descent Solution.pptLecture-4-Linear Regression-Gradient Descent Solution.ppt
Lecture-4-Linear Regression-Gradient Descent Solution.pptVGaneshKarthikeyan
 
1.3 Basic coding skills_tupels_sets_controlloops.ppt
1.3 Basic coding skills_tupels_sets_controlloops.ppt1.3 Basic coding skills_tupels_sets_controlloops.ppt
1.3 Basic coding skills_tupels_sets_controlloops.pptVGaneshKarthikeyan
 
Python_basics_tuples_sets_lists_control_loops.ppt
Python_basics_tuples_sets_lists_control_loops.pptPython_basics_tuples_sets_lists_control_loops.ppt
Python_basics_tuples_sets_lists_control_loops.pptVGaneshKarthikeyan
 
1.4 Work with data types and variables, numeric data, string data.pptx
1.4 Work with data types and variables, numeric data, string data.pptx1.4 Work with data types and variables, numeric data, string data.pptx
1.4 Work with data types and variables, numeric data, string data.pptxVGaneshKarthikeyan
 
Inheritance_with_its_types_single_multi_hybrid
Inheritance_with_its_types_single_multi_hybridInheritance_with_its_types_single_multi_hybrid
Inheritance_with_its_types_single_multi_hybridVGaneshKarthikeyan
 
Refined_Lecture-8-Probability Review-2.ppt
Refined_Lecture-8-Probability Review-2.pptRefined_Lecture-8-Probability Review-2.ppt
Refined_Lecture-8-Probability Review-2.pptVGaneshKarthikeyan
 
Refined_Lecture-13-Maximum Likelihood Estimators-Part-C.ppt
Refined_Lecture-13-Maximum Likelihood Estimators-Part-C.pptRefined_Lecture-13-Maximum Likelihood Estimators-Part-C.ppt
Refined_Lecture-13-Maximum Likelihood Estimators-Part-C.pptVGaneshKarthikeyan
 
Refined_Lecture-15-Dimensionality Reduction-Uunspervised-PCA.ppt
Refined_Lecture-15-Dimensionality Reduction-Uunspervised-PCA.pptRefined_Lecture-15-Dimensionality Reduction-Uunspervised-PCA.ppt
Refined_Lecture-15-Dimensionality Reduction-Uunspervised-PCA.pptVGaneshKarthikeyan
 
Bias-Variance_relted_to_ML.pdf
Bias-Variance_relted_to_ML.pdfBias-Variance_relted_to_ML.pdf
Bias-Variance_relted_to_ML.pdfVGaneshKarthikeyan
 
Refined_Lecture-1-Motivation & Applications.ppt
Refined_Lecture-1-Motivation & Applications.pptRefined_Lecture-1-Motivation & Applications.ppt
Refined_Lecture-1-Motivation & Applications.pptVGaneshKarthikeyan
 
Lecture-4-Linear Regression-Gradient Descent Solution.PPTX
Lecture-4-Linear Regression-Gradient Descent Solution.PPTXLecture-4-Linear Regression-Gradient Descent Solution.PPTX
Lecture-4-Linear Regression-Gradient Descent Solution.PPTXVGaneshKarthikeyan
 

More from VGaneshKarthikeyan (20)

Unit III Part I_Opertaor_Overloading.pptx
Unit III Part I_Opertaor_Overloading.pptxUnit III Part I_Opertaor_Overloading.pptx
Unit III Part I_Opertaor_Overloading.pptx
 
Linear_discriminat_analysis_in_Machine_Learning.pptx
Linear_discriminat_analysis_in_Machine_Learning.pptxLinear_discriminat_analysis_in_Machine_Learning.pptx
Linear_discriminat_analysis_in_Machine_Learning.pptx
 
K-Mean clustering_Introduction_Applications.pptx
K-Mean clustering_Introduction_Applications.pptxK-Mean clustering_Introduction_Applications.pptx
K-Mean clustering_Introduction_Applications.pptx
 
Refined_Lecture-14-Linear Algebra-Review.ppt
Refined_Lecture-14-Linear Algebra-Review.pptRefined_Lecture-14-Linear Algebra-Review.ppt
Refined_Lecture-14-Linear Algebra-Review.ppt
 
randomwalks_states_figures_events_happenings.ppt
randomwalks_states_figures_events_happenings.pptrandomwalks_states_figures_events_happenings.ppt
randomwalks_states_figures_events_happenings.ppt
 
stochasticmodellinganditsapplications.ppt
stochasticmodellinganditsapplications.pptstochasticmodellinganditsapplications.ppt
stochasticmodellinganditsapplications.ppt
 
1.10 Tuples_sets_usage_applications_advantages.pptx
1.10 Tuples_sets_usage_applications_advantages.pptx1.10 Tuples_sets_usage_applications_advantages.pptx
1.10 Tuples_sets_usage_applications_advantages.pptx
 
Neural_Networks_scalability_consntency.ppt
Neural_Networks_scalability_consntency.pptNeural_Networks_scalability_consntency.ppt
Neural_Networks_scalability_consntency.ppt
 
Lecture-4-Linear Regression-Gradient Descent Solution.ppt
Lecture-4-Linear Regression-Gradient Descent Solution.pptLecture-4-Linear Regression-Gradient Descent Solution.ppt
Lecture-4-Linear Regression-Gradient Descent Solution.ppt
 
1.3 Basic coding skills_tupels_sets_controlloops.ppt
1.3 Basic coding skills_tupels_sets_controlloops.ppt1.3 Basic coding skills_tupels_sets_controlloops.ppt
1.3 Basic coding skills_tupels_sets_controlloops.ppt
 
Python_basics_tuples_sets_lists_control_loops.ppt
Python_basics_tuples_sets_lists_control_loops.pptPython_basics_tuples_sets_lists_control_loops.ppt
Python_basics_tuples_sets_lists_control_loops.ppt
 
1.4 Work with data types and variables, numeric data, string data.pptx
1.4 Work with data types and variables, numeric data, string data.pptx1.4 Work with data types and variables, numeric data, string data.pptx
1.4 Work with data types and variables, numeric data, string data.pptx
 
Inheritance_with_its_types_single_multi_hybrid
Inheritance_with_its_types_single_multi_hybridInheritance_with_its_types_single_multi_hybrid
Inheritance_with_its_types_single_multi_hybrid
 
Refined_Lecture-8-Probability Review-2.ppt
Refined_Lecture-8-Probability Review-2.pptRefined_Lecture-8-Probability Review-2.ppt
Refined_Lecture-8-Probability Review-2.ppt
 
Refined_Lecture-13-Maximum Likelihood Estimators-Part-C.ppt
Refined_Lecture-13-Maximum Likelihood Estimators-Part-C.pptRefined_Lecture-13-Maximum Likelihood Estimators-Part-C.ppt
Refined_Lecture-13-Maximum Likelihood Estimators-Part-C.ppt
 
Refined_Lecture-15-Dimensionality Reduction-Uunspervised-PCA.ppt
Refined_Lecture-15-Dimensionality Reduction-Uunspervised-PCA.pptRefined_Lecture-15-Dimensionality Reduction-Uunspervised-PCA.ppt
Refined_Lecture-15-Dimensionality Reduction-Uunspervised-PCA.ppt
 
Bias-Variance_relted_to_ML.pdf
Bias-Variance_relted_to_ML.pdfBias-Variance_relted_to_ML.pdf
Bias-Variance_relted_to_ML.pdf
 
Refined_Lecture-1-Motivation & Applications.ppt
Refined_Lecture-1-Motivation & Applications.pptRefined_Lecture-1-Motivation & Applications.ppt
Refined_Lecture-1-Motivation & Applications.ppt
 
Lecture-4-Linear Regression-Gradient Descent Solution.PPTX
Lecture-4-Linear Regression-Gradient Descent Solution.PPTXLecture-4-Linear Regression-Gradient Descent Solution.PPTX
Lecture-4-Linear Regression-Gradient Descent Solution.PPTX
 
13.Data Conversion.pptx
13.Data Conversion.pptx13.Data Conversion.pptx
13.Data Conversion.pptx
 

Recently uploaded

XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXssuser89054b
 
Unit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdfUnit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdfRagavanV2
 
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Bookingdharasingh5698
 
UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performancesivaprakash250
 
Top Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoor
Top Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoorTop Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoor
Top Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoordharasingh5698
 
Thermal Engineering Unit - I & II . ppt
Thermal Engineering  Unit - I & II . pptThermal Engineering  Unit - I & II . ppt
Thermal Engineering Unit - I & II . pptDineshKumar4165
 
Generative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTGenerative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTbhaskargani46
 
Thermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptThermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptDineshKumar4165
 
Intze Overhead Water Tank Design by Working Stress - IS Method.pdf
Intze Overhead Water Tank  Design by Working Stress - IS Method.pdfIntze Overhead Water Tank  Design by Working Stress - IS Method.pdf
Intze Overhead Water Tank Design by Working Stress - IS Method.pdfSuman Jyoti
 
notes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.pptnotes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.pptMsecMca
 
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...Arindam Chakraborty, Ph.D., P.E. (CA, TX)
 
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...SUHANI PANDEY
 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlysanyuktamishra911
 
Bhosari ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For ...
Bhosari ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For ...Bhosari ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For ...
Bhosari ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For ...tanu pandey
 
Unleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leapUnleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leapRishantSharmaFr
 
Double Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torqueDouble Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torqueBhangaleSonal
 

Recently uploaded (20)

XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
 
Unit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdfUnit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdf
 
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak HamilCara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
 
Call Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
 
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
 
UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performance
 
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
 
Top Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoor
Top Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoorTop Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoor
Top Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoor
 
Thermal Engineering Unit - I & II . ppt
Thermal Engineering  Unit - I & II . pptThermal Engineering  Unit - I & II . ppt
Thermal Engineering Unit - I & II . ppt
 
Generative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTGenerative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPT
 
Thermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptThermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.ppt
 
Intze Overhead Water Tank Design by Working Stress - IS Method.pdf
Intze Overhead Water Tank  Design by Working Stress - IS Method.pdfIntze Overhead Water Tank  Design by Working Stress - IS Method.pdf
Intze Overhead Water Tank Design by Working Stress - IS Method.pdf
 
notes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.pptnotes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.ppt
 
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
 
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghly
 
Bhosari ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For ...
Bhosari ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For ...Bhosari ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For ...
Bhosari ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For ...
 
FEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced Loads
FEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced LoadsFEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced Loads
FEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced Loads
 
Unleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leapUnleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leap
 
Double Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torqueDouble Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torque
 

Numpy_defintion_description_usage_examples.pptx

  • 1. Outline ❑ Jupyter Notebook ❑ Numpy ❑ Importing Package ❑ Creating an Array ❑ Generating arrays using built-in functions ❑ Shape and Reshape an Array ❑ Numpy Operations ❑ Access Elements from an Array ❑ Advantages of Numpy ❑ Matrix operations
  • 2. Jupyter Notebook ❑ Jupyter Notebook is a web-based interactive IDE for Executing the Python. ❑ Install the Anaconda Navigator to your Machine and open the Navigator.
  • 3. Jupyter Notebook ❑ Launch the Jupyter Notebook; once Launch means (it will take some time). ❑ Open the Jupyter Notebook (Type Jupyter Notebook in Start Menu Search)
  • 4. Importing Package ❑Numpy standards for Numerical Python ❑It is mainly used for handling the mathematical operations. ❑Import the Numpy packages using import command Package Name Alias Name of Numpy
  • 5. Create an Array ❑Collection of ordered data elements of basic data types ❑Syntax: np.array(object) Array List
  • 6. Cont… ❑It handles different data types entries including integer, float, string and so on. int String
  • 7. Run Time Inputs number_list = [] n = int(input("Enter the list size ")) print("n") for i in range(0, n): print("Enter number at index", i, ) item = int(input()) number_list.append(item) print("User list is ", number_list)
  • 8. Generate arrays using linspace ❑np.linspace()-returns equally spaced numbers within the given range based on the sample number ❑Syntax: np.linspace(start,stop,num) ❑start -start of interval range ❑stop -end of interval range ❑num-number of samples to be generated
  • 9. Generate arrays using arange() ❑np.arange()-returns equally spaced numbers with in the given range based on step size ❑Syntax: np.arange(start,stop,step) ❑start -start of interval range ❑stop -end of interval range ❑step -step size of interval ❑Generate an array with start=1and stop=100 by specifying step=2
  • 10. Generate arrays using zeros() ❑np.zeros()-returns an array of given shape and type filled with zeros ❑Syntax: np.zeros(shape,dtype) ❑shape -integer or sequence of integers ❑dtype-data type (default: float) 1-D 2-D
  • 11. Generate arrays using ones() ❑np.ones()-returns an array of given shape and type filled with ones ❑Syntax: np.ones(shape,dtype) ❑shape -integer or sequence of integers ❑dtype-data type (default: float) 1-D 2-D
  • 12. Generate arrays using eye() ❑np.eye()-returns an array of given shape and diagonals are filled with ones and rest of the diagonals are filled with zeros. ❑Syntax: np.eye(shape)
  • 13. Generate arrays using random.rand() ❑np.random.rand()-returns an array of given shape filled with random values ❑Syntax: numpy.random.rand(shape) ❑shape -integer or sequence of integers ❑The range of random number should be between 0-1 1-D 2-D
  • 14. Shape an array ❑np.shape()-returns dimension of an array ❑Syntax: np.shape(var) 1-D 2-D ❑In 1-D, return shape as 5 ❑In 2-D, will return 2rows and 3 columns.
  • 15. Reshape an array ❑reshape()-returns an array to new shape without changing its data ❑Syntax: reshape(dimension)
  • 16. Numpy addition ❑np.sum()-returns sum of all array elements ❑Syntax: np.sum(array,axis) ❑array() –input array ❑axis() –axis along which sum should be calculated ❑If axis= None ; calculate overall sum
  • 17. Numpy addition ❑if axis=0; calculate sum along with column wise ❑If axis=1; calculate sum along with row wise Column wise sum Row wise sum
  • 18. Numpy addition ❑np.add()-performs element wise addition between two arrays ❑Syntax: np.add(array_1,array_2) ❑Create two arrays a and b Output
  • 19. Numpy subtraction ❑np.subtract()-performs element wise subtraction between two arrays ❑Syntax: np.subtract(array_1,array_2) ❑Create two arrays a and b Output
  • 20. Numpy multiply ❑np.multiply()-performs element wise multiplication between two arrays ❑Syntax: np.multiply(array_1,array_2) ❑Create two arrays a and b Output
  • 21. Numpy divide ❑np.divide()-performs element wise divide operation between two arrays ❑Syntax: np.divide(array_1,array_2) ❑Create two arrays a and b Output
  • 22. Numpy remainder ❑np.remainder()-performs element wise remainder between two arrays ❑Syntax: np.remainder(array_1,array_2) ❑Create two arrays a and b Output
  • 23. Accessing components of an array ❑Components of an array can be accessed using index number
  • 24. Subset of arrays ❖Subset a 2x2 array from the original array m ❖Consider the first two rows and columns from m ❖Print subset array sub
  • 25. Subset of arrays ❖Here the value 1should be updated to 12 ❖Print the updated array ❖Modifying the subset will automatically update the original array also
  • 26. Transpose of an array np.transpose()- permute the dimensions of array ❑Syntax: np.transpose(array) Output
  • 27. Advantages of Numpy ❑timeit module can be used to measure the execution time for snippets of code ❑Comparing the processing speed of a list and an array using an addition operation List Array ❑Creating a list ❑Creating a array
  • 28. Create a Matrix ❑matrix()- returns a matrix from an array type object or string of data ❑Syntax: np.matrix(data) ❑shape- returns number of rows and columns from a matrix ❑shape[0]- returns the no. of row ❑shape[1]-returns the no. of columns. ❑size()- returns total no of elements.
  • 29. Modifying matrix using insert() ❑insert()- adds values at a given position and axis in a matrix ❑Syntax: np.insert(matrix, obj, values, axis) ❑marix- input matrix ❑obj- index position ❑values-matrix of values to be inserted ❑axis- axis=0- row insert otherwise- column wise insertion
  • 30. Matrix Operations Row Insertion Column Insertion S. No. Function Description 1. np.add(M1,M2) Performs element wise addition between two matrix 2. np.subtract(M1,M 2) Performs element wise subtraction between two matrix 3. np.dot(M1,M2) Performs element wise multiplication between two matrix 4. np.divide(M1,M2) Performs element wise division between two matrix