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!
a[0]is just syntactic sugar fora.__getitem__(0); it's just another method call, which could (or could not) return anything in particular. - DSMistest with integers.int('255') is 255returnsTrue, but the same for257does not. - hpaulj