I am trying to make a function where if the last value of order is 1 then the code will append 1 to orders and then append the number 20 to the value array as well. If the last value is 0 in order then it will append 1 to order and append the number 15 to value.
import numpy as np
order = np.array([0,1,0,0,0])
order1 = np.array([0,1,0,0,1])
value= np.array([10,55,30,3,10])
Expected Output:
#if last element is equal to 1
order = np.array([0,1,0,0,0,1])
value= np.array([10,55,30,3,10,20])
#if last element is equal to 0
order1 = np.array([0,1,0,0,1,0])
value= np.array([10,55,30,3,10,15])