Python Nn
Python Nn
Arr[row, col]
Arr[0:3]
Arr[::-1]
Arr[0::2]
Arr[-N:]
🔹 Advanced Indexing
Index= [1,3,4]
Arr[index]
Correct: arr[[0,1,2],[1,2,0]]
arr[::2]* =2
To replace col
Arr[(arr %2 == 0)] *= 2
15. How can you replace the first and last column in a 2D
array with 0s?
Arr[:,[0,-1]] =0
🔹 Trickier/Conceptual
19. What does dtype=object do, and when would you use
it?
First : starts from 0 index and returns every 3rd index value,
IDK
🔹 Bonus Conceptual
Supports broadcasting
Mask = condition
memoryvie
len(), tolist(), tobytes(), slicing operations
w
NoneType
is None (used mainly in comparisons, no methods directly)
(None)
🎯 Important: