निम्नलिखित का आउटपुट क्या होगा?
What will be the output of the following ?
import numpy as np
print(np.maximum([2, 3, 4], [1, 5, 2]))
A
[1 5 2]
B
[1 5 4]
C
[2 3 4]
D
[2 5 4]
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) = 2max(3, 5) = 5max(4, 2) = 4
So, the output is [2 5 4].
Answer: (D) [2 5 4].
Correct Answer: D) [2 5 4]