Steven D'Aprano wrote:
And indeed numpy arrays do share state. Why? No idea. Somebody thought that it was a good idea. (Not me though...)
Probably because they're often large and people don't want to incur the overhead of copying them any more than necessary. So slices are defined to return views rather than independent objects. -- Greg -- https://mail.python.org/mailman/listinfo/python-list