<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def angact_ho(x,omega):
 """ Calculate angle and action variable in sho potential with parameter omega """

    action = (x[3:]**2+(omega*x[:3])**2)/(2.*omega)
    angle = np.array([np.arctan(-x[3+i]/omega[i]/x[i]) if x[i]!=0. else -np.sign(x[3+i])*np.pi/2. for i in range(3)])
    for i in range(3):
        if(x[i]<0):
            angle[i]+=np.pi
    return np.concatenate((action,angle % (2.*np.pi)))