I try to train a KNN model using a Local Binary Pattern (LBP) descriptor.
My data is a numpy.array of shape (67, 26) elements, but myaray.shape returns (67, ).
I tried to reshape the array like:
myarray.reshape(-1, 26)
but it resulted in the following error:
ValueError: cannot reshape array of size 67 into shape (26)**
Thanks you so much
As I'm not sure I've clearly understood your question, first I'm going to try to mock up your data:
Please, run the following code:
If you get the same results as above,
numpy.stackshould do the trick as pointed out by @hpaulj in the comments: