Reshaping nested numpy array,

Viewed 178

I have a numpy array say

x.shape

(5,)

x[0].shape

(512,)
How to apply reshape so that when I get

x.shape

(5,512)

1 Answers

If your content of x is all of the same shape:

x = np.stack(x)
Related