title: 'float' object has no attribute 'arctan'
body: <ol>
  <li><p>i have data as below.</p>
  
  <pre><code> data                                                            
   62600.0    
   63000.0    
   62900.0    
   60400.0    
   59800.0
  </code></pre></li>
  <li><p>code is </p>
  
  <pre><code>   def Simplify(G_x,data):
         data['dx'] = data*G_x 
         data['dy'] = data - data.shift(1)
         data = data.fillna(0)
         data['G_mag'] = np.sqrt((data['dx']+data['dy'])*(data['dx']+data['dy'])-2*data['dx']*data['dy']) 
         data['Theta'] = np.arctan(data['dy']/data['dx'])
         data = data.fillna(0) 
         data['Theta']=0
         data.loc[data['Theta']&lt;0,'Theta'] = data['Theta']+2*np.pi
         data.loc[(data['Theta']&lt;=np.pi/8) &amp; (data['Theta']&gt;=0), 'Theta'] = np.arctan(0)
         data.loc[(data['Theta']&lt;=3*np.pi/8) &amp; (data['Theta']&gt;1*np.pi/8), 'Theta'] = np.arctan(1)
         data.loc[(data['Theta']&lt;=np.pi) &amp; (data['Theta']&gt;3*np.pi/8), 'Theta'] = np.arctan(2)
         data.loc[(data['Theta']&lt;=13*np.pi/8) &amp; (data['Theta']&gt;np.pi), 'Theta'] = np.arctan(-2)
         data.loc[(data['Theta']&lt;=15*np.pi/8) &amp; (data['Theta']&gt;13*np.pi/8), 'Theta'] = np.arctan(-1)
         data.loc[(data['Theta']&gt;15*np.pi/8) &amp; (data['Theta']&lt;=2*np.pi), 'Theta'] = np.arctan(0)
         data['New_dy'] = data['dx']*np.tan(data['Theta'])
         data['N_AC']=data['New_dy'].cumsum()+data['Adj Close'][0]
         return data['N_AC']
  </code></pre></li>
  </ol>
  
  <p>3.Error message is </p>
  
  <pre><code>           'float' object has no attribute 'arctan'
             'float' object has no attribute 'sqrt'
  </code></pre>
  
  <p>4. When i run this code directly,not using function. it works well. 
     is there any good way to solve this problem. thanks!</p>