title: Weird set index error
body: <p>I am stuck on this chunk of code</p>
  
  <pre><code>hdiag = zeros(Float64,2)
  hdiag = [0,0]
  println(hdiag)
  hdiag[1] = randn()
  </code></pre>
  
  <p>In the last line I obtain an <code>InexactError</code>. 
  It is strange because randn() it's a <code>Float64</code>, but for some reason I have to do <code>hdiag=randn(2)</code> and then there should not be a problem.</p>