Edit Template

NumPy Array Operations in Hindi

NumPy Array में हम कई तरीके के operations (जैसे- Arithmetic Operations, Comparison Operations, sum, min, max, median, etc.) भी कर सकते है।

Arithmetic Operations

NumPy Arrays में हम arithmetic operations को (जैसे “+”, “-“, “*”, “/”, “%”, “**”) directly apply कर सकते है, इन arrays में operations element by element होते है।

Comparison Operations

NumPy Arrays में हम comparison operations को (जैसे “=”, “>”, “<”) directly apply कर सकते है, इन arrays में operations element by element होते है और हमे Boolean array return करता है।

Aggregate Functions

NumPy में कई सारे build-in statistical functions (जैसे sum(), min(), max(), etc.) होते है जिनका use हमे directly किसी function में कर सकते है। अगर 2D Array है तो हम इसमे specify कर सकते है की operation rows wise (horizontal operation) होगा या column wise (vertical operation) होगा, rows wise के लिए axis=1 parameter देंगे और column wise के लिए axis=0 parameter देंगे।

 

sum() : ये function किसी array के elements का sum return करता है।

min() : ये function किसी array के elements का minimum value return करता है।

max() : ये function किसी array के elements का maximum return करता है।

mean() : ये function किसी array के elements का mean value return करता है।

median() : ये function किसी array के elements का median value return करता है।

std() : ये function किसी array के elements का standard deviation return करता है।

var() : ये function किसी array के elements का sum return करता है।

argmin() : ये function किसी array के elements के minimum value का index return करता है।

argmax() : ये function किसी array के elements के maximum value का index return करता है।

Axis-wise Operations

NumPy array मे हम specify कर सकते है कि aggregate functions के operation row-wise (axis=1) या column-wise (axis=0) होगा। 

Broadcasting in NumPy

जब हम arrays के बीच कोई operation करते है तो उन arrays के shape ऐसे होने चाहिए की उनके बीच कोई भी operation हो जाए अगर उनके shape different हो तो हमे error मिल सकता है। NumPy उनके shapes को automatically expand करके करके operation perform करता है जिन्हे Broadcasting कहा जाता है, but इसमे भी हमे ये ध्यान रखना होता है कि shapes को right side से compare किया जाता है इसलिए दोनों का right side dimension same होना चाहिए, और smaller dimension expand होता है अगर वो 1 है तो ठीक वरना error आएगा।

Add a comment...

  • All Posts
  • Artificial Intelligence
  • Computer Fundamentals
  • Computer Networks
  • Data Analytics
  • Data Science
  • DBMS
  • Deep Learning
  • Digital Electronics
  • DSA with Python
  • Excel
  • Exercise
  • Git & Github
  • Machine Learning
  • Matplotlib
  • Natural Language Processing
  • NumPy
  • Operating System
  • Pandas-s
  • Power BI
  • Python Tutorial
  • Scikit-learn
  • Seaborn
  • SQL & MySQL
computer networks

Table of Contents All Chapters 1. OSI Model      1.1. Physical Layer      1.2. Data Link Layer  ...

computer networks

Table of Contents All Chapters 1. Topology 2. Types of Topology      2.1. Point to Point Topology    ...

computer networks

Table of Contents All Chapters 1. Data Communication 2. Types of Data Communication      2.1. Simplex      2.2....

digital electronics number system

Table of Contents All Chapters 1. Logic Gate 2. AND Gate      2.1. AND Gate Truth Table 3. OR...

Edit Template

Sign up to track your learning

Login to continue your learning tracking

To reset your password, please enter your email address or username below.

Scroll to Top