Answers for "transpose of a matrix using numpy"

6

transpose matrix numpy

>>> a = np.array([[1, 2], [3, 4]])
>>> a
array([[1, 2],
       [3, 4]])
>>> a.transpose()
array([[1, 3],
       [2, 4]])
>>> a.transpose((1, 0))
array([[1, 3],
       [2, 4]])
>>> a.transpose(1, 0)
array([[1, 3],
       [2, 4]])
Posted by: Guest on November-03-2020
2

numpy transpose

>>> np.transpose(x)
array([[0, 2],
       [1, 3]])
Posted by: Guest on September-27-2020
0

transpose of a matrix using numpy

M = np.matrix([[1,2],[3,4]])

M.transpose()
Posted by: Guest on April-13-2021

Code answers related to "transpose of a matrix using numpy"

Browse Popular Code Answers by Language