为什么这个数组在我不操作它的时候会发生变化?

Why is this array changing when I'm not operating on it?

我有两个数组:

order = np.array([ 0, 1,  2,  3,  4,  5,  6, 10,  7,  8,  9])
X = np.array([[1,1], [1,2], [2,1], [1,7], [7,3], [8,3], [8,2], [10,5], [10,6], [10,7], [10,1]]

我是 运行 以下代码:

m,n = X.shape
for i in range(m):
     print( i," ",X[order[i]])

我得到以下结果:

0   [1 1]
1   [1 2]
2   [2 1]
3   [1 7]
4   [7 3]
5   [8 3]
6   [8 2]
7   [10  1]
8   [10  1]
9   [10  1]
10  [10  1]

为什么最后的元素改变了?我不明白为什么通过索引某些元素来更改 X。

编辑:添加 np.array

import numpy
# your data (order and X)
m, n = numpy.shape(X)
for i in range(m):
    print(i, " ", X[order[i]])

输出:

0   [1, 1]
1   [1, 2]
2   [2, 1]
3   [1, 7]
4   [7, 3]
5   [8, 3]
6   [8, 2]
7   [10, 1]
8   [10, 5]
9   [10, 6]
10   [10, 7]