I'm trying to either append to an empty array or overwrite/assign new values for all elements in an array. Here is my code:
initial_income = np.arange(N) # Initial Income
red_income = np.arange(N) # Reduced Initial Income
def reduce():
global initial_income
global red_income
for i in initial_income:
red_income = (i * 0.65) / 12
The issue is that I get back 5.362500000000001 -- the last result. How do I assign these new values to the existing red_income array?
Grateful for pointers in the right direction.