np_points= np.ones((3,4))
temp_np_points= np_points
print(temp_np_points)
print("=============")
#其實(shí)還是指向原本的內(nèi)存底洗,只是獲取不同的內(nèi)容弊琴,沒有改變內(nèi)存內(nèi)容寓搬,np_points不會(huì)變
temp_np_points= temp_np_points[ : ,1: ]
print(temp_np_points)
print("=============")
#改變內(nèi)存的內(nèi)容,temp_np_points= np_points,這2個(gè)都會(huì)變
temp_np_points[0][0] = '90'
print(temp_np_points)
print("=============")
print(np_points)
[[1. 1. 1. 1.]
[1. 1. 1. 1.]
[1. 1. 1. 1.]]
=============
[[1. 1. 1.]
[1. 1. 1.]
[1. 1. 1.]]
=============
[[90.? 1.? 1.]
[ 1.? 1.? 1.]
[ 1.? 1.? 1.]]
=============
[[ 1. 90.? 1.? 1.]
[ 1.? 1.? 1.? 1.]
[ 1.? 1.? 1.? 1.]]