
Table of Contents All Chapters 1. Dunder Methods 2. Commonly Used Dunder Methods Python Tutorial Python Introduction Identation &...
matplotlib का use हम data visualization के लिए करते हैं, यह एक python library है। इसके help से हम data को graph, chart or plot के form में देख सकते हैं। इसका use data analytics और scientific computation में अक्सर किया जाता है।
ये python की library है इसलिए हमारे computer में पहले से python install होना जरूरी है, अब NumPy को install करने के लिए हमें अपने computer में command terminal को open करना है और उसमें pip install numpy लिखकर enter press कर देना है अब कुछ ही time में numpy हमारे computer में install हो जाएगा।
Arrays : Python में हम array के लिए list का use करते हैं but NumPy में भी array होता है जो की list से काफी fast होता है।
Mathematical Operation : NumPy में हम addition, subtraction, multiplication, division, etc जैसे mathematical operations easily कर सकते हैं।
Linear Algebra : NumPy में हम matrices के operations को भी कर सकते हैं।
Random Number Generation : NumPy एक function होता है, जिसके help से हम कोई भी random number generate कर सकते हैं।
Integration : NumPy का use हम SciPy, Matplotlib जैसे libraries के साथ आसानी कर सकते है।
import numpy as np
# List se NumPy array banate hain
arr = np.array([1, 2, 3, 4, 5])
print("NumPy Array:", arr)
print("Array Type:", type(arr))
print("Dimension of Array:", arr.ndim)
print("Shape of Array:", arr.shape)
import : python library को अपने program मे use करने के लिए उसे अपने program मे import करना होता है, इसके लिए “import” use करते है। जैसा की इस example code के 1st line मे हमने NumPy को import किया है import numpy as np
यहाँ पर हमने “as” का use करके matplotlib को एक short form दिया है np,इससे होता ये है की अब जहां भी हमे NumPy लिखने की जरूरत होगी तो वह हम सिर्फ np लिखेंगे हमारा काम हो जाएगा । आप np के जगह कुछ भी ले सकते है but वो meaningful रहे, आम तौर पर हम np का ही use करते है ।
Table of Contents All Chapters 1. Dunder Methods 2. Commonly Used Dunder Methods Python Tutorial Python Introduction Identation &...
Table of Contents All Chapters 1. Encapsulation 2. Access Modifiers 2.1. Public Members 2.2. Protected Members...
Table of Contents All Chapters 1. Lambda Function 2. Nestesd Lambda Function 3. Lambda Function with if-else 4. Lanbda with...
Table of Contents All Chapters 1. Nested Function 2. Return Function from Function 3. Higher Order Function 4. Function Recursion...
Table of Contents All Chapters 1. Parameters and Aguments 2. Function Parameters 2.1. *args 2.2. **kwargs...
Table of Contents All Chapters 1. Context Manager 2. with Statement 2.1. __enter__() Method 2.2. __exit__()...
Table of Contents All Chapters 1. Error Handling 2. Types of Error 2.1. Syntax Error 2.2....
Table of Contents All Chapters 1. File Pointer 2. File Pointer Methods 2.1. tell() Method 2.2....
Table of Contents All Chapters 1. File Handling 2. Types of File 3. open() and close() Methods 4. File Modes...