1D tensor
Should improve error handling here
----> 1 torch.randn(8).t()
RuntimeError: out of range
th> torch.randn(8):t()
[string "_RESULT={torch.randn(8):t()}"]:1: calling 't' on bad self (Tensor must have 2 dimensions at /tmp/luarocks_torch-scm-1-6380/torch7/generic/Tensor.c:592)
3D tensor, t()
should throw an error here:
In [46]: torch.randn(8,1,2).t()
Out[46]:
(0 ,.,.) =
-0.3007 2.2507
...
0.1970 -0.6926
[torch.FloatTensor of size 1x8x2]
like lua torch:
th> torch.randn(8,1,2):t()
[string "_RESULT={torch.randn(8,1,2):t()}"]:1: calling 't' on bad self (Tensor must have 2 dimensions at /tmp/luarocks_torch-scm-1-6380/torch7/generic/Tensor.c:592)
1D tensor
Should improve error handling here
3D tensor, t()
should throw an error here:
like lua torch: