how I get different array size in calculating tpr?
You get different array sizes for your different classes because the number of points in your ROC curve depends on the number of unique predictions. 

If your model only predicts 0, .5, and 1 your ROC curve will have three points. If your model predicts 100 different probabilities, your ROC curve will have ~100 points. (In practice, the length of the ROC curve may have a couple extra points where the points (0,0) and (1,1) are appended. 

If you look at np.unique(y_score[:,i]).size for different i you should see the differences.