import numpy as np
from sklearn.preprocessing import OneHotEncoder

y_ent = np.array( [0,0,1,2,3] )
y_ent = y_ent.reshape( -1,1 )

encoder = OneHotEncoder( )
y = encoder.fit_transform( y_ent ).toarray()

print( y )
