예제 #1
0
파일: step38.py 프로젝트: khiro112/dezero
if '__file__' in globals():
    import os, sys
    sys.path.append(os.path.join(os.path.dirname(__file__), '..'))

import numpy as np
from dezero import Variable
import dezero.functions as F

x = Variable(np.random.rand(2, 3))
y = x.transpose()
print(y)
y = x.T
print(y)
 def test_transpose_var_method(self):
     x = Variable(np.array([[1, 2, 3], [4, 5, 6]]))
     y = x.transpose()
     assert y.shape == (3, 2)