title: convert numpy warnings to errors
body: <p>I am getting </p>
  
  <pre><code>C:\Anaconda\lib\site-packages\numpy\core\_methods.py:59: RuntimeWarning: Mean of empty slice.
      warnings.warn("Mean of empty slice.", RuntimeWarning)
  </code></pre>
  
  <p>when I run a code I wrote. This is a large codebase. The problem is, I do not see where in <strong>my code</strong> this warning was fired.</p>
  
  <p>I would rather have this as an error (e.g. an exception), so that I can see where this was generated in my code.</p>
  
  <p>Is it possible to have exceptions instead of warnings?</p>
  
  <p>Note: I solved my problem debugging line by line. But the question still stands.</p>