How do I explain the last line of these?
>>> a = 1
>>> a is a
True
>>> a = [1, 2, 3]
>>> a is a
True
>>> a = np.zeros(3)
>>> a
array([ 0., 0., 0.])
>>> a is a
True
>>> a[0] is a[0]
False
I always thought that everything is at least "is" that thing itself!
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…