answered 11 years ago
Hello,
when assigning N to K, no data is copied, so you working on the original data, To keep the original, you need a deep copy of N:
K=N.copy()