I am working on a scoring method that scores based on correct answers with three attempts. For each row, if the first attempt is right, the score is 1, if the second attempt is right, the score is 1/2, if the third attempt is right, the score is 1/3.
The total score is the sum of the scores for each row divided by the number of rows.
The inputs that need to be scored are numpy arrays that are shape(n,3) where n is any number.
print inputs[0:5]
[[11111 22222 22222]
[44444 55555 55555]
[33333 33333 33333]
[11111 11111 11111]]
[[11111 22222 0]
[44444 55555 0]
[33333 0 0]
[11111 0 0]]
You could use np.diff

input[:,1:] *=(np.diff(input,axis=1)!=0)
Sample run 
In [19]: input
Out[19]:
array([[11111, 22222, 22222],
[44444, 55555, 55555],
[33333, 33333, 33333],
[11111, 11111, 11111]])
In [20]: input[:,1:] *=(np.diff(input,axis=1)!=0)
In [21]: input
Out[21]:
array([[11111, 22222, 0],
[44444, 55555, 0],
[33333, 0, 0],
[11111, 0, 0]])