title: cannot cast array data from dtype('float64') to dtype('u32') according to the rule 'safe'
body: <p>This is my function <code>logistic (x,w)</code></p>
  
  <pre><code>def logistic(x, w):
    return 1.0 / (1.0 + np.exp(-x.dot(w)))
  
  w = 2 * np.random.ranf((NDIM, 1)) - 1
  
  def score(matrix, w):
     y= np.matrix ([':,0])
     X= np.matrix ([':,1:])
  </code></pre>
  
  <p>when I apply :</p>
  
  <pre><code>pred = logistic(X, w) 
  </code></pre>
  
  <p>I get the error:</p>
  
  <pre><code>" cannot cast array data from dtype('float64') to dtype('u32') according to the rule 'safe' " 
  </code></pre>