doing MNIST tutorial without any MLframe, but got stuck in one hot encoding stage
y contains label data of digits images
0, 1, 2, 3, 4, 5, 6, 7, 8, 9
and its size is (10000, )
I want to convert each category numbers to one hot encoding array
0 : 1 0 0 0 0 0 0 0 0 0 0
1 : 0 1 0 0 0 0 0 0 0 0 0
2 : 0 0 1 0 0 0 0 0 0 0 0
and so on
so I made a code
import numpy as np
y_one=np.zeros(y.size, 10)
y_one[np.arange(y.size), y]=1
it says 'data type not understood'
How to implement one hot encoding without sklearn or tf in this case?