So what's happening here?

Paul Appleby pap at nowhere.invalid
Fri Jun 5 08:46:22 EDT 2015


I saw somewhere on the net that you can copy a list with slicing. So 
what's happening when I try it with a numpy array?

>>> a = numpy.array([1,2,3])
>>> b = a[:]
>>> a is b
False
>>> b[1] = 9
>>> a
array([1, 9, 3])



More information about the Python-list mailing list