title: Python numpy.corrcoef() RuntimeWarning: invalid value encountered in true_divide c /= stddev[:, None]
body: <p>It seems that <code>corrcoef</code> from <code>numpy</code> throw a <strong>RuntimeWarning</strong> when a constant list passed to the <code>corrcoef()</code> function, for example the below code throw a warning :</p>
  
  <pre><code>import numpy as np
  X = [1.0, 2.0, 3.0, 4.0]
  Y = [2, 2, 2, 2]
  print(np.corrcoef(X, Y)[0, 1])
  </code></pre>
  
  <p>Warning :</p>
  
  <pre><code>/usr/local/lib/python3.6/site-packages/numpy/lib/function_base.py:3003: RuntimeWarning: invalid value encountered in true_divide
    c /= stddev[:, None]
  </code></pre>
  
  <p>Can anyone explain why it's throw this error when one of the lists is constant, and how to prevent this error when a constant list is passed to the function.</p>