How to convert numpy array into libsvm format
The svmlight format is tailored to classification/regression problems. Therefore, the array X is a matrix with as many rows as data points in your set, and as many columns as features. y is the vector of instance labels.
For example, suppose you have 1000 objects (images of bicycles and bananas, for example), featurized in 400 dimensions. X would be 1000x400, and y would be a 1000-vector with a 1 entry where there should be a bicycle, and a -1 entry where there should be a banana.
I have a numpy array for an image and am trying to dump it into the libsvm format of LABEL I0:V0 I1:V1 I2:V2..IN:VN. I see that scikit-learn has a dump_svmlight_file and would like to use that if possible since it's optimized and stable. 
It takes parameters of X, y, and file output name. The values I'm thinking about would be:
X - numpy array
y - ????
file output name - self-explanatory 
Would this be a correct assumption for X? I'm very confused about what I should do for y though. 
It appears it needs to be a feature set of some kind. I don't know how I would go about obtaining that however. Thanks in advance for the help!