SlideShare a Scribd company logo
NumPy
Understanding NumPy Arrays,
Operations, and Indexing
Introduction to NumPy
• NumPy (Numerical Python) is a library for
numerical computing in Python. It provides
support for multi-dimensional arrays and
mathematical functions.
Creating NumPy Arrays
• - From Python Lists: np.array([1, 2, 3])
• - From Built-in Methods: np.zeros(), np.ones(),
np.arange(), np.linspace()
• - From Random Module: np.random.rand(),
np.random.randint()
Array Attributes and Methods
• - Reshape: arr.reshape(3,3)
• - Max & Min: arr.max(), arr.min()
• - Argmax & Argmin: arr.argmax(), arr.argmin()
• - Shape: arr.shape
• - Dtype: arr.dtype
• - Size: arr.size
• - Ndim: arr.ndim
Operations on Arrays
• - Copying: arr.copy()
• - Appending & Inserting: np.append(),
np.insert()
• - Sorting: np.sort()
• - Removing: np.delete()
• - Concatenation: np.concatenate()
• - Splitting: np.split()
Data Loading & Saving
• - Save: np.save('file.npy', arr)
• - Load: np.load('file.npy')
• - CSV Handling: np.savetxt('file.csv', arr),
np.loadtxt('file.csv')
NumPy Indexing and Selection
• - Indexing 2D Array: arr[1,2]
• - Logical Selection: arr[arr > 3]
Broadcasting in NumPy
• - Perform operations on arrays of different
shapes without manual resizing
• - Example: arr + 5, arr1 + arr2 (with different
shapes)

More Related Content

PPTX
NumPy.pptx
PPTX
Presentation1.pptxvghvfhgvbn nbnmbnbjkbjkbjib
PPTX
python_programming_NumPy_Pandas_Notes.pptx
PPT
CAP776Numpy.ppt
PPT
CAP776Numpy (2).ppt
PPT
Python crash course libraries numpy-1, panda.ppt
PPTX
getting started with numpy and pandas.pptx
PPTX
NumPy.pptx
NumPy.pptx
Presentation1.pptxvghvfhgvbn nbnmbnbjkbjkbjib
python_programming_NumPy_Pandas_Notes.pptx
CAP776Numpy.ppt
CAP776Numpy (2).ppt
Python crash course libraries numpy-1, panda.ppt
getting started with numpy and pandas.pptx
NumPy.pptx

Similar to NumPy_Presentation about Numerical python.pptx (20)

PPTX
L 5 Numpy final learning and Coding
PPTX
NumPy.pptx
PPTX
PPTX
Numpy.pptx
PPTX
NumPy-python-27-9-24-we.pptxNumPy-python-27-9-24-we.pptx
PPTX
UNIT-03_Numpy (1) python yeksodbbsisbsjsjsh
PPTX
Data Preprocessing Introduction for Machine Learning
PPT
Introduction to Numpy Foundation Study GuideStudyGuide
PPTX
NumPy.pptx Bachelor of Computer Application
PPTX
numpy code and examples with attributes.pptx
PPTX
Python 8416516 16 196 46 5163 51 63 51 6.pptx
DOCX
Numpy in Python.docx
PPTX
Data Analysis in Python-NumPy
PPTX
1.NumPy is a Python library used for wor
PPTX
Chapter 5-Numpy-Pandas.pptx python programming
PPTX
Data Analyzing And Visualization Using Python.pptx
PPTX
Introduction to numpy.pptx
PPTX
numpydocococ34554367827839271966666.pptx
PPTX
NUMPY [Autosaved] .pptx
PPTX
NUMPY-2.pptx
L 5 Numpy final learning and Coding
NumPy.pptx
Numpy.pptx
NumPy-python-27-9-24-we.pptxNumPy-python-27-9-24-we.pptx
UNIT-03_Numpy (1) python yeksodbbsisbsjsjsh
Data Preprocessing Introduction for Machine Learning
Introduction to Numpy Foundation Study GuideStudyGuide
NumPy.pptx Bachelor of Computer Application
numpy code and examples with attributes.pptx
Python 8416516 16 196 46 5163 51 63 51 6.pptx
Numpy in Python.docx
Data Analysis in Python-NumPy
1.NumPy is a Python library used for wor
Chapter 5-Numpy-Pandas.pptx python programming
Data Analyzing And Visualization Using Python.pptx
Introduction to numpy.pptx
numpydocococ34554367827839271966666.pptx
NUMPY [Autosaved] .pptx
NUMPY-2.pptx
Ad

More from sarfarazkhanwattoo (13)

PPTX
Self-Balancing BSTs,K Dimensional Tree.pptx
PPTX
Muhammad Sarfaraz(Presentation) Final.pptx
PPTX
RDKit python libraries one famous about chemistry (.pptx
PPTX
sibgh python importance for chemistry .pptx
PPTX
chempy ,this is the presentaion for chemistry .pptx
PPTX
jawad Internship this is the presentation (1).pptx
PPTX
Information security presentation donwe.pptx
PPTX
Automatic interactive charts presentation for show.pptx
PPTX
Lecture 5,6 [Autosavedaot IOT ]slides.pptx
PPTX
MAHA PPT.pptx kncksd jkk cjkc kjkdsl alknxk
PPTX
ARM PRESENTATION Final version.pptx jsjdkwn
PPTX
Matplotlib_Presentation jk jdjklskncncsjkk
PPTX
NLP_presentation on machine learning for human - Copy.pptx
Self-Balancing BSTs,K Dimensional Tree.pptx
Muhammad Sarfaraz(Presentation) Final.pptx
RDKit python libraries one famous about chemistry (.pptx
sibgh python importance for chemistry .pptx
chempy ,this is the presentaion for chemistry .pptx
jawad Internship this is the presentation (1).pptx
Information security presentation donwe.pptx
Automatic interactive charts presentation for show.pptx
Lecture 5,6 [Autosavedaot IOT ]slides.pptx
MAHA PPT.pptx kncksd jkk cjkc kjkdsl alknxk
ARM PRESENTATION Final version.pptx jsjdkwn
Matplotlib_Presentation jk jdjklskncncsjkk
NLP_presentation on machine learning for human - Copy.pptx
Ad

Recently uploaded (20)

PDF
102 student loan defaulters named and shamed – Is someone you know on the list?
PPTX
Microbial diseases, their pathogenesis and prophylaxis
PDF
FourierSeries-QuestionsWithAnswers(Part-A).pdf
PPTX
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
PDF
Supply Chain Operations Speaking Notes -ICLT Program
PDF
OBE - B.A.(HON'S) IN INTERIOR ARCHITECTURE -Ar.MOHIUDDIN.pdf
PPTX
Lesson notes of climatology university.
PDF
Anesthesia in Laparoscopic Surgery in India
PPTX
202450812 BayCHI UCSC-SV 20250812 v17.pptx
PPTX
Final Presentation General Medicine 03-08-2024.pptx
PDF
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
PPTX
Cell Structure & Organelles in detailed.
PPTX
Institutional Correction lecture only . . .
PDF
Complications of Minimal Access Surgery at WLH
PDF
A GUIDE TO GENETICS FOR UNDERGRADUATE MEDICAL STUDENTS
PPTX
Pharma ospi slides which help in ospi learning
PDF
O7-L3 Supply Chain Operations - ICLT Program
PDF
GENETICS IN BIOLOGY IN SECONDARY LEVEL FORM 3
PDF
Module 4: Burden of Disease Tutorial Slides S2 2025
PPTX
GDM (1) (1).pptx small presentation for students
102 student loan defaulters named and shamed – Is someone you know on the list?
Microbial diseases, their pathogenesis and prophylaxis
FourierSeries-QuestionsWithAnswers(Part-A).pdf
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
Supply Chain Operations Speaking Notes -ICLT Program
OBE - B.A.(HON'S) IN INTERIOR ARCHITECTURE -Ar.MOHIUDDIN.pdf
Lesson notes of climatology university.
Anesthesia in Laparoscopic Surgery in India
202450812 BayCHI UCSC-SV 20250812 v17.pptx
Final Presentation General Medicine 03-08-2024.pptx
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
Cell Structure & Organelles in detailed.
Institutional Correction lecture only . . .
Complications of Minimal Access Surgery at WLH
A GUIDE TO GENETICS FOR UNDERGRADUATE MEDICAL STUDENTS
Pharma ospi slides which help in ospi learning
O7-L3 Supply Chain Operations - ICLT Program
GENETICS IN BIOLOGY IN SECONDARY LEVEL FORM 3
Module 4: Burden of Disease Tutorial Slides S2 2025
GDM (1) (1).pptx small presentation for students

NumPy_Presentation about Numerical python.pptx

  • 2. Introduction to NumPy • NumPy (Numerical Python) is a library for numerical computing in Python. It provides support for multi-dimensional arrays and mathematical functions.
  • 3. Creating NumPy Arrays • - From Python Lists: np.array([1, 2, 3]) • - From Built-in Methods: np.zeros(), np.ones(), np.arange(), np.linspace() • - From Random Module: np.random.rand(), np.random.randint()
  • 4. Array Attributes and Methods • - Reshape: arr.reshape(3,3) • - Max & Min: arr.max(), arr.min() • - Argmax & Argmin: arr.argmax(), arr.argmin() • - Shape: arr.shape • - Dtype: arr.dtype • - Size: arr.size • - Ndim: arr.ndim
  • 5. Operations on Arrays • - Copying: arr.copy() • - Appending & Inserting: np.append(), np.insert() • - Sorting: np.sort() • - Removing: np.delete() • - Concatenation: np.concatenate() • - Splitting: np.split()
  • 6. Data Loading & Saving • - Save: np.save('file.npy', arr) • - Load: np.load('file.npy') • - CSV Handling: np.savetxt('file.csv', arr), np.loadtxt('file.csv')
  • 7. NumPy Indexing and Selection • - Indexing 2D Array: arr[1,2] • - Logical Selection: arr[arr > 3]
  • 8. Broadcasting in NumPy • - Perform operations on arrays of different shapes without manual resizing • - Example: arr + 5, arr1 + arr2 (with different shapes)