title: If-Else statement works weird in Python
body: <pre><code>import numpy as np 
  import sklearn 
  import sklearn.datasets
  from sklearn import svm
  x = np.array([1,3,67,8])
  print(x)
  print(type(x))
  
  if type(x) != int:
      y = x.astype(int)
      print(y)
      print(type(y))
  else:
      print ("X is already an integer")
  </code></pre>
  
  <p>This is my code here if <code>x</code> is not integer then convert it to integer else print it as integer but it works weirdly that code in <code>if</code> statement is executed even if <code>x</code> is integer or float.</p>