Here's the deal, i have an array of multiples elements with about half of it being zeros. I want to remove these zeros by using a function instead of the traditional x=x[x!=0]
.
I tried:
def funct(x,y):
x=x[x!=0]
y=y[y!=0]
But the output i get is the same variable i had before i execute the function. An array with multiple zeros.
I'm new with python so sorry if this question sound ridiculous.
Thank you very much!