title: RuntimeWarning: invalid value encountered in arccos
body: <p>I am new to using Python but getting along with it fairly well. I keep getting the error you see below and not sure what the problem is exactly as I believe the values are correct and stated. What do you think the problem exactly is? I am trying to graph from t = 0 to t=PM, and the formula you see below is angle arccos.</p>
  
  <p>Couldn't find the troubleshooting of this arccos error online. Running Python 3.5.</p>
  
  <pre><code>import numpy as np
  import matplotlib
  from matplotlib import pyplot
  from __future__ import division
  
  rE = 1.50*(10**11)
  rM = 3.84*(10**8)
  PE = 3.16*(10**7)
  PM = 2.36*(10**6)
  
  t = np.linspace(0, PM, 200)
  
  # anaconda/lib/python3.5/site-packages/ipykernel/__main__.py:1: RuntimeWarning: invalid value encountered in arccos
  y = 0.5*(np.arccos(2*(np.pi)*t*((1/PM)-(1/PE))+90))
  </code></pre>