I have written the below codes to make 2 functions. The only difference is the second line.(input_array *= 7 and input_array = input_array * 7)
But they gave completely different results. (The results are in the picture attached) I wonder why is that and what's the diefference between the two second lines?
def array_times_seven(input_array):
input_array *= 7
return input_array
test_array = np.ones((5,5))
array_times_seven(test_array[3:,3:])
test_array
#-----------------------------------------------
def array_times_seven(input_array):
input_array = input_array * 7
return input_array
test_array = np.ones((5,5))
array_times_seven(test_array[3:,3:])
test_array