ADVERTISEMENT

Observe the following code and identify what will be the outcome (2)?

7. Observe the following code and identify what will be the outcome?

import numpy as np 

x = np.array([[0, 1],
       [2, 3]])
np.transpose(x)
  1. array([[0, 2],
           [1, 3]])
  2. array([[0, 1],
           [2, 3]])
  3. array([[2, 3],
           [0, 1]])
  4. None of the mentioned above

Answer: A)

array([[0, 2],
       [1, 3]])

Explanation:

In the above code, an array has been declared and stored in a variable x. And then, matrix transposed and print.

Comments and Discussions!




ADVERTISEMENT
ADVERTISEMENT

Languages: » C » C++ » C++ STL » Java » Data Structure » C#.Net » Android » Kotlin » SQL
Web Technologies: » PHP » Python » JavaScript » CSS » Ajax » Node.js » Web programming/HTML
Solved programs: » C » C++ » DS » Java » C#
Aptitude que. & ans.: » C » C++ » Java » DBMS
Interview que. & ans.: » C » Embedded C » Java » SEO » HR
CS Subjects: » CS Basics » O.S. » Networks » DBMS » Embedded Systems » Cloud Computing
» Machine learning » CS Organizations » Linux » DOS
More: » Articles » Puzzles » News/Updates

© https://www.includehelp.com some rights reserved.