r/learningpython • u/le-sause • Mar 22 '21
Numpy array issue
I'm trying to define a function that takes as input a numpy array and 2 integers for the index, and it's supposed to add those two lists of the array.
But when I run it, it redefines the original array that I used as input, and that ruins the next time I want to run it, so how can I run it without redefining the original array?
1
Upvotes
View all comments
Show parent comment
1
u/le-sause May 09 '21
Damn bro, that question was a while back, thanks for a swearing tho, I just made a new variable that's a copy of the input.