Python Jupyter notebook how to display matrix in vertical
When I try to index array, I use this code for printing column part with Numpy or Pytorch.

import numpy as np
a = np.random.randn(5,3)
a[:,1]


or

import torch
a = torch.Tensor(5,3)
a[:,1]


The output is displayed like this.

array([-0.07478094, -1.87787326,  0.50407517,  1.13335836,  0.23140931])


But I want to display output as column.(because i indexed column)

array([-0.07478094,
       -1.87787326,
        0.50407517,
        1.13335836,
        0.23140931])


Furthermore, When I make tensor with torch.ones(5), the result is

tensor([1., 1., 1., 1., 1.])


but I want to see the type of output on the buttom like this

tensor([1., 1., 1., 1., 1.])
[torch.FloatTensor of size 5]

The reason why i want to display this is that i can't distinguish tensor and numpy

Can anyone tell me how to do this? Thanks.

try this:

np.vstack(a)


Hope this helps..
