title: Correct way to test for numpy.dtype
body: <p>I'm looking at a third-party lib that has the following <code>if</code>-test:</p>
  
  <pre><code>if isinstance(xx_, numpy.ndarray) and xx_.dtype is numpy.float64 and xx_.flags.contiguous:
      xx_[:] = ctypes.cast(xx_.ctypes._as_parameter_,ctypes.POINTER(ctypes.c_double))
  </code></pre>
  
  <p>It appears that <code>xx_.dtype is numpy.float64</code> always fails:</p>
  
  <pre><code>&gt;&gt;&gt; xx_ = numpy.zeros(8, dtype=numpy.float64)
  &gt;&gt;&gt; xx_.dtype is numpy.float64
  
  False
  </code></pre>
  
  <p>What is the correct way to test that the <code>dtype</code> of a numpy array is <code>float64</code> ?</p>