I have and array like this :
[[[a, b], [c, d], [e, f]]]
When i shape to this array it gives (2,)
I tried reshape(-1) method but i did not work. I want to reshape this array into:
[[a, b], [c, d], [e, f]]
How can i convert that? I would be glad if you help.
a,b, etc. As@uniQshows, if they are single characters (or numbers) , the result is an array with shape (1,3,2), not the (2,) that you claim. If it really was (1,3,2) shape, you could just index on the first dimension and get a (3,2) array. That indexing would work even if it was a nested list instead of array.reshape(-1)doesn't work. "doesn't work" is not very informative - to you or us. What was wrong? An error message? A wrong result? Don't just throw that result away; try to learn from it.