Sample code:
import numpy as np
a = np.zeros((5,5))
a[[0,1]] = 1 #(list of indices)
print('results with list based indexing\n', a)
a = np.zeros((5,5))
a[(0,1)] = 1 #(tuple of indices)
print('results with tuple based indexing\n',a)
Result:
results with list based indexing
[[ 1. 1. 1. 1. 1.]
[ 1. 1. 1. 1. 1.]
[ 0. 0. 0. 0. 0.]
[ 0. 0. 0. 0. 0.]
[ 0. 0. 0. 0. 0.]]
results with tuple based indexing
[[ 0. 1. 0. 0. 0.]
[ 0. 0. 0. 0. 0.]
[ 0. 0. 0. 0. 0.]
[ 0. 0. 0. 0. 0.]
[ 0. 0. 0. 0. 0.]]
As you must have noticed, indexing array with list gave a different result than with tuple of same indices. I'm using python3 with numpy version 1.13.3
What is the fundamental difference in indexing a numpy array with list and tuple?