2

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)

ARUN NADAR
  • 95
  • 7
  • 3
    Does this answer your question? [Reshape an array in NumPy](https://stackoverflow.com/questions/14476415/reshape-an-array-in-numpy) – 10 Rep Jun 29 '20 at 01:51

1 Answers1

1

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

x = np.stack(x)
Ehsan
  • 12,072
  • 2
  • 20
  • 33