title: Float Array is not converted to int: Python
body: <p>I have a float numpy array x, which contains values like, 0, .5, 1, 1.5,etc. I want to convert the float values into integers based on some equation and store them in a new array, newx. I did this, </p>
  
  <pre><code>newx=np.zeros(x.shape[0])
      for i in range (x.shape [0]):
          newx[i]=  ((2*x[i]) +1)
      print(newx, v)
  </code></pre>
  
  <p>However, when printing xnew, I get values like </p>
  
  <pre><code>(array([   1.,    2.,    3.,    4.,    5.,    6.,    7.,    8.,    9.,
           10.,   11.,   12.,   13.,   14.,   15.,   16.,   17.,   18.])
  </code></pre>
  
  <p>newx must be used in some process, and it must be integer, when I want to use it in that process, I get an error stating that it must be of integer or Boolean type. Can anyone please tell me what mistake I've done?</p>
  
  <p>Thank You.</p>