A

Admin • 802.91K Points
Coach

Q. What will np.array([True, False, True]) + np.array([False, True, True]) return?

  • (A) [True, True, True]
  • (B) [1, 1, 2]
  • (C) [False, False, True]
  • (D) [1, 0, 1]
  • Correct Answer - Option(B)
  • Views: 4
  • Filed under category Numpy
  • Hashtags:

Explanation by: Admin
Boolean values are treated as 1 (True) and 0 (False), so addition results in [1,1,2].

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.