I have a pretty stupid question, but for some reason, I just can't figure out what to do. I have a multi-dimensional numpy array, that should have the following shape:
(345138, 30, 300)
However, it actually has this shape:
(345138, 1)
inside the 1 element-array is the array containing the shape
(30, 300)
So how do I "move" the inside array, so that the shape is correct?
At the moment it looks like this:
[[ array([[0, 0, 0, ..., 0, 0, 0],
[0, 0, 0, ..., 0, 0, 0],
[0, 0, 0, ..., 0, 0, 0],
...,
[0, 0, 0, ..., 0, 0, 0],
[0, 0, 0, ..., 0, 0, 0],
[0, 0, 0, ..., 0, 0, 0]], dtype=int32)]
[ array([[0, 0, 0, ..., 0, 0, 0],
[0, 0, 0, ..., 0, 0, 0],
[0, 0, 0, ..., 0, 0, 0],
...,
but I want this without the array(...), dtype=32 and move what is in there into the first array so that the shape is (345138, 30, 300) and looks like this:
[[ [0, 0, 0, ..., 0, 0, 0],
[0, 0, 0, ..., 0, 0, 0],
[0, 0, 0, ..., 0, 0, 0],
...,
[0, 0, 0, ..., 0, 0, 0],
[0, 0, 0, ..., 0, 0, 0],
[0, 0, 0, ..., 0, 0, 0]],
[ [0, 0, 0, ..., 0, 0, 0],
[0, 0, 0, ..., 0, 0, 0],
[0, 0, 0, ..., 0, 0, 0],
...,
Any ideas?
.tolist()already?np.array(x)and if the shapes are compatible they will be squashed.