निम्नलिखित का आउटपुट क्या होगा?
What will be the output of the following ?
import numpy as np
print(np.maximum([2, 3, 4], [1, 5, 2]))
A)
B)
C)
D)
Explanation:
Sure!
np.maximum([2, 3, 4], [1, 5, 2])
compares the two lists element by element and returns the larger value at each position.
max(2, 1) = 2
max(3, 5) = 5
max(4, 2) = 4
So, the output is [2 5 4].
Answer: (D) [2 5 4].