title: How to obtain unit gradient vector image python?
body: <p>I am trying to obtain the correct image for the unit gradient vector calculations. I am working with retinal images. Here is the code that I have used to try and obtain the correct image along with the formula that I am trying to implement.</p>
  <ol>
  <li><code>Nx = arrayx_cropped/np.sqrt(arrayx_cropped**2 + arrayy_cropped**2)</code></li>
  <li><code>Ny = arrayy_cropped/np.sqrt(arrayx_cropped**2 + arrayy_cropped**2)</code></li>
  </ol>
  <p>Whenever I run this formula the following warning message appears: Runtim
  <code>Ny = arrayy_cropped/np.sqrt(arrayx_cropped**2 + arrayy_cropped**2)</code></p>
  <p>The resulting image that I obtain is this: <a href="https://i.stack.imgur.com/U181p.png" rel="nofollow noreferrer">This is the image obtained for using the unit gradient formula in the x direction using equation 1) </a></p>
  <p>Again help or advice on how to go about starting to resolve this issue would be greatly appreciated.</p>