Skip to content
Okerew edited this page Aug 2, 2024 · 3 revisions

You can use swap like here

from okrolearn.okrolearn import *
x = Tensor(np.array([[1, 2], [3, 4]]))
y = x.swap(0, 1)  # This will transpose the matrix
print(y.data)
Clone this wiki locally