On 25/11/20 7:47 pm, pjfarl...@earthlink.net wrote:
Why isn't the final value of the numpy array npary in the following code the same as the initial value before some but not all elements of the array were changed to a new value?
Slicing a numpy array doesn't copy anything, it just gives you another view of the underlying data. This is a trap you need to watch out for, since it's different from the way sequences normally behave in Python. -- Greg -- https://mail.python.org/mailman/listinfo/python-list