🚀 Hurry! Offer Ends In
00 Days
00 Hours
00 Mins
00 Secs
Enroll Now
X

निम्नलिखित का आउटपुट क्या होगा?

What will be the output of the following ?

import numpy as np
print(np.minimum([2, 3, 4], [1, 5, 2]))
A)
B)
C)
D)

Explanation:

Let's analyze the given code:

import numpy as np
print(np.minimum([2, 3, 4], [1, 5, 2]))

Explanation:

  • np.minimum(a, b) compares two arrays element-wise and returns a new array containing the smaller value for each corresponding pair of elements.
  • In this case, we have two lists:
    • [2, 3, 4]
    • [1, 5, 2]

Comparing elements:

  • min(2, 1)1
  • min(3, 5)3
  • min(4, 2)2

So, the result is [1, 3, 2].

Output:

(D) [1 3 2]

Latest Updates