Skip to content

Tag: arrays

Is there a way to fix value-error problem

Hello guys i am trying to implement an algortihm to remove water from underwater images and make image more noticable , but i got an errror ValueError: max() arg is an empty sequence , at the function homomorpic on this line r = max(np.ravel(result[:,:i])) , the error is caused because the result array is emp…

Numpy Mean element wise over 3D arrays

I want to take the mean of 9 arrays element wise so to have one I need something fast. The first bit of code takes forever. And with numpy mean without specifying an axis I get one value. I dont want to specify an axis. I want to take the mean element by element. with output: juneMean[‘wind’][:,:,…

Overwriting an array in Numpy function Python

I am trying to write a numpy function that iterates with itself to update the values of its function. If for example Random_numb was equal to [50, 74, 5, 69, 50]. So the calculations would go like, 10* 50 = 500 for the first calculation, with the equation Starting_val = Starting_val * Random_numb. The Startin…