<p dir="auto">Over in <a href="https://github.com/nipy/nibabel">nipy/nibabel</a>, we're encountering an intermittent bug in AppVeyor tests, specifically for Python 3.4 and 3.5. All of the failures seem to involve numpy objects, so there's some chance that it is a numpy problem.</p>
<p dir="auto">The issue seems to be that an object is not recognized as itself, which leads me to think that it's a failing <code class="notranslate">is</code> check. I will walk through the exceptions below.</p>
<p dir="auto">This has been happening with low frequency since June 8, with markedly greater frequency in the last month or two. (We have four jobs that hit this issue: <code class="notranslate">C:\Python3{4,5}{,-x64}</code>. Any given one may pass or fail in any given build, but the odds of all four passing seem to have dropped significantly.)</p>
<p dir="auto">Here is the first known failure: <a href="https://ci.appveyor.com/project/nipy/nibabel/build/1.0.379/job/7ftediiuui4ofvep" rel="nofollow">https://ci.appveyor.com/project/nipy/nibabel/build/1.0.379/job/7ftediiuui4ofvep</a><br>
And a recent failure: <a href="https://ci.appveyor.com/project/nipy/nibabel/build/1.0.506/job/wnxtbgrvcr7lr2y7" rel="nofollow">https://ci.appveyor.com/project/nipy/nibabel/build/1.0.506/job/wnxtbgrvcr7lr2y7</a></p>
<p dir="auto">cc <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/matthew-brett/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/matthew-brett">@matthew-brett</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/yarikoptic/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/yarikoptic">@yarikoptic</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/chrispycheng/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/chrispycheng">@chrispycheng</a></p>
<h3 dir="auto">Reproducing code example:</h3>
<p dir="auto">We've been unable to reproduce in any other environment, so a minimal example is impossible.</p>
<h3 dir="auto">Error message:</h3>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="======================================================================
ERROR: autogenerated test from validate_data_deprecated
----------------------------------------------------------------------
Traceback (most recent call last):
  File &quot;c:\python34-x64\lib\site-packages\nose\case.py&quot;, line 198, in runTest
    self.test(*self.arg)
  File &quot;c:\python34-x64\lib\site-packages\nibabel\tests\test_api_validators.py&quot;, line 23, in meth
    validator(self, imaker, params)
  File &quot;c:\python34-x64\lib\site-packages\nibabel\tests\test_image_api.py&quot;, line 380, in validate_data_deprecated
    assert_data_similar(img._data, params)
  File &quot;c:\python34-x64\lib\site-packages\nibabel\tests\test_helpers.py&quot;, line 80, in assert_data_similar
    real_arr = np.asarray(arr)
  File &quot;c:\python34-x64\lib\site-packages\numpy\core\numeric.py&quot;, line 501, in asarray
    return array(a, dtype, copy=False, order=order)
  File &quot;c:\python34-x64\lib\site-packages\nibabel\minc1.py&quot;, line 261, in __array__
    return self.minc_file.get_scaled_data()
  File &quot;c:\python34-x64\lib\site-packages\nibabel\minc2.py&quot;, line 139, in get_scaled_data
    return self._normalize(raw_data, sliceobj)
  File &quot;c:\python34-x64\lib\site-packages\nibabel\minc1.py&quot;, line 189, in _normalize
    dmin, dmax = self._get_valid_range()
  File &quot;c:\python34-x64\lib\site-packages\nibabel\minc2.py&quot;, line 98, in _get_valid_range
    info = np.iinfo(ddt.type)
  File &quot;c:\python34-x64\lib\site-packages\numpy\core\getlimits.py&quot;, line 516, in __init__
    raise ValueError(&quot;Invalid integer data type.&quot;)
ValueError: Invalid integer data type.
======================================================================
ERROR: nibabel.tests.test_minc2.TestMinc2File.test_array_proxy_slicing
----------------------------------------------------------------------
Traceback (most recent call last):
  File &quot;c:\python34-x64\lib\site-packages\nose\case.py&quot;, line 198, in runTest
    self.test(*self.arg)
  File &quot;c:\python34-x64\lib\site-packages\nibabel\tests\test_minc1.py&quot;, line 200, in test_array_proxy_slicing
    arr = img.get_data()
  File &quot;c:\python34-x64\lib\site-packages\nibabel\dataobj_images.py&quot;, line 202, in get_data
    data = np.asanyarray(self._dataobj)
  File &quot;c:\python34-x64\lib\site-packages\numpy\core\numeric.py&quot;, line 553, in asanyarray
    return array(a, dtype, copy=False, order=order, subok=True)
  File &quot;c:\python34-x64\lib\site-packages\nibabel\minc1.py&quot;, line 261, in __array__
    return self.minc_file.get_scaled_data()
  File &quot;c:\python34-x64\lib\site-packages\nibabel\minc2.py&quot;, line 139, in get_scaled_data
    return self._normalize(raw_data, sliceobj)
  File &quot;c:\python34-x64\lib\site-packages\nibabel\minc1.py&quot;, line 189, in _normalize
    dmin, dmax = self._get_valid_range()
  File &quot;c:\python34-x64\lib\site-packages\nibabel\minc2.py&quot;, line 98, in _get_valid_range
    info = np.iinfo(ddt.type)
  File &quot;c:\python34-x64\lib\site-packages\numpy\core\getlimits.py&quot;, line 516, in __init__
    raise ValueError(&quot;Invalid integer data type.&quot;)
ValueError: Invalid integer data type.
======================================================================
ERROR: nibabel.tests.test_minc2.TestMinc2File.test_load
----------------------------------------------------------------------
Traceback (most recent call last):
  File &quot;c:\python34-x64\lib\site-packages\nose\case.py&quot;, line 198, in runTest
    self.test(*self.arg)
  File &quot;c:\python34-x64\lib\site-packages\nibabel\tests\test_minc1.py&quot;, line 187, in test_load
    data = img.get_data()
  File &quot;c:\python34-x64\lib\site-packages\nibabel\dataobj_images.py&quot;, line 202, in get_data
    data = np.asanyarray(self._dataobj)
  File &quot;c:\python34-x64\lib\site-packages\numpy\core\numeric.py&quot;, line 553, in asanyarray
    return array(a, dtype, copy=False, order=order, subok=True)
  File &quot;c:\python34-x64\lib\site-packages\nibabel\minc1.py&quot;, line 261, in __array__
    return self.minc_file.get_scaled_data()
  File &quot;c:\python34-x64\lib\site-packages\nibabel\minc2.py&quot;, line 139, in get_scaled_data
    return self._normalize(raw_data, sliceobj)
  File &quot;c:\python34-x64\lib\site-packages\nibabel\minc1.py&quot;, line 189, in _normalize
    dmin, dmax = self._get_valid_range()
  File &quot;c:\python34-x64\lib\site-packages\nibabel\minc2.py&quot;, line 98, in _get_valid_range
    info = np.iinfo(ddt.type)
  File &quot;c:\python34-x64\lib\site-packages\numpy\core\getlimits.py&quot;, line 516, in __init__
    raise ValueError(&quot;Invalid integer data type.&quot;)
ValueError: Invalid integer data type.
======================================================================
ERROR: nibabel.tests.test_minc2.TestMinc2File.test_mincfile_slicing
----------------------------------------------------------------------
Traceback (most recent call last):
  File &quot;c:\python34-x64\lib\site-packages\nose\case.py&quot;, line 198, in runTest
    self.test(*self.arg)
  File &quot;c:\python34-x64\lib\site-packages\nibabel\tests\test_minc1.py&quot;, line 171, in test_mincfile_slicing
    data = mnc.get_scaled_data()
  File &quot;c:\python34-x64\lib\site-packages\nibabel\minc2.py&quot;, line 139, in get_scaled_data
    return self._normalize(raw_data, sliceobj)
  File &quot;c:\python34-x64\lib\site-packages\nibabel\minc1.py&quot;, line 189, in _normalize
    dmin, dmax = self._get_valid_range()
  File &quot;c:\python34-x64\lib\site-packages\nibabel\minc2.py&quot;, line 98, in _get_valid_range
    info = np.iinfo(ddt.type)
  File &quot;c:\python34-x64\lib\site-packages\numpy\core\getlimits.py&quot;, line 516, in __init__
    raise ValueError(&quot;Invalid integer data type.&quot;)
ValueError: Invalid integer data type."><pre class="notranslate"><code class="notranslate">======================================================================
ERROR: autogenerated test from validate_data_deprecated
----------------------------------------------------------------------
Traceback (most recent call last):
  File "c:\python34-x64\lib\site-packages\nose\case.py", line 198, in runTest
    self.test(*self.arg)
  File "c:\python34-x64\lib\site-packages\nibabel\tests\test_api_validators.py", line 23, in meth
    validator(self, imaker, params)
  File "c:\python34-x64\lib\site-packages\nibabel\tests\test_image_api.py", line 380, in validate_data_deprecated
    assert_data_similar(img._data, params)
  File "c:\python34-x64\lib\site-packages\nibabel\tests\test_helpers.py", line 80, in assert_data_similar
    real_arr = np.asarray(arr)
  File "c:\python34-x64\lib\site-packages\numpy\core\numeric.py", line 501, in asarray
    return array(a, dtype, copy=False, order=order)
  File "c:\python34-x64\lib\site-packages\nibabel\minc1.py", line 261, in __array__
    return self.minc_file.get_scaled_data()
  File "c:\python34-x64\lib\site-packages\nibabel\minc2.py", line 139, in get_scaled_data
    return self._normalize(raw_data, sliceobj)
  File "c:\python34-x64\lib\site-packages\nibabel\minc1.py", line 189, in _normalize
    dmin, dmax = self._get_valid_range()
  File "c:\python34-x64\lib\site-packages\nibabel\minc2.py", line 98, in _get_valid_range
    info = np.iinfo(ddt.type)
  File "c:\python34-x64\lib\site-packages\numpy\core\getlimits.py", line 516, in __init__
    raise ValueError("Invalid integer data type.")
ValueError: Invalid integer data type.
======================================================================
ERROR: nibabel.tests.test_minc2.TestMinc2File.test_array_proxy_slicing
----------------------------------------------------------------------
Traceback (most recent call last):
  File "c:\python34-x64\lib\site-packages\nose\case.py", line 198, in runTest
    self.test(*self.arg)
  File "c:\python34-x64\lib\site-packages\nibabel\tests\test_minc1.py", line 200, in test_array_proxy_slicing
    arr = img.get_data()
  File "c:\python34-x64\lib\site-packages\nibabel\dataobj_images.py", line 202, in get_data
    data = np.asanyarray(self._dataobj)
  File "c:\python34-x64\lib\site-packages\numpy\core\numeric.py", line 553, in asanyarray
    return array(a, dtype, copy=False, order=order, subok=True)
  File "c:\python34-x64\lib\site-packages\nibabel\minc1.py", line 261, in __array__
    return self.minc_file.get_scaled_data()
  File "c:\python34-x64\lib\site-packages\nibabel\minc2.py", line 139, in get_scaled_data
    return self._normalize(raw_data, sliceobj)
  File "c:\python34-x64\lib\site-packages\nibabel\minc1.py", line 189, in _normalize
    dmin, dmax = self._get_valid_range()
  File "c:\python34-x64\lib\site-packages\nibabel\minc2.py", line 98, in _get_valid_range
    info = np.iinfo(ddt.type)
  File "c:\python34-x64\lib\site-packages\numpy\core\getlimits.py", line 516, in __init__
    raise ValueError("Invalid integer data type.")
ValueError: Invalid integer data type.
======================================================================
ERROR: nibabel.tests.test_minc2.TestMinc2File.test_load
----------------------------------------------------------------------
Traceback (most recent call last):
  File "c:\python34-x64\lib\site-packages\nose\case.py", line 198, in runTest
    self.test(*self.arg)
  File "c:\python34-x64\lib\site-packages\nibabel\tests\test_minc1.py", line 187, in test_load
    data = img.get_data()
  File "c:\python34-x64\lib\site-packages\nibabel\dataobj_images.py", line 202, in get_data
    data = np.asanyarray(self._dataobj)
  File "c:\python34-x64\lib\site-packages\numpy\core\numeric.py", line 553, in asanyarray
    return array(a, dtype, copy=False, order=order, subok=True)
  File "c:\python34-x64\lib\site-packages\nibabel\minc1.py", line 261, in __array__
    return self.minc_file.get_scaled_data()
  File "c:\python34-x64\lib\site-packages\nibabel\minc2.py", line 139, in get_scaled_data
    return self._normalize(raw_data, sliceobj)
  File "c:\python34-x64\lib\site-packages\nibabel\minc1.py", line 189, in _normalize
    dmin, dmax = self._get_valid_range()
  File "c:\python34-x64\lib\site-packages\nibabel\minc2.py", line 98, in _get_valid_range
    info = np.iinfo(ddt.type)
  File "c:\python34-x64\lib\site-packages\numpy\core\getlimits.py", line 516, in __init__
    raise ValueError("Invalid integer data type.")
ValueError: Invalid integer data type.
======================================================================
ERROR: nibabel.tests.test_minc2.TestMinc2File.test_mincfile_slicing
----------------------------------------------------------------------
Traceback (most recent call last):
  File "c:\python34-x64\lib\site-packages\nose\case.py", line 198, in runTest
    self.test(*self.arg)
  File "c:\python34-x64\lib\site-packages\nibabel\tests\test_minc1.py", line 171, in test_mincfile_slicing
    data = mnc.get_scaled_data()
  File "c:\python34-x64\lib\site-packages\nibabel\minc2.py", line 139, in get_scaled_data
    return self._normalize(raw_data, sliceobj)
  File "c:\python34-x64\lib\site-packages\nibabel\minc1.py", line 189, in _normalize
    dmin, dmax = self._get_valid_range()
  File "c:\python34-x64\lib\site-packages\nibabel\minc2.py", line 98, in _get_valid_range
    info = np.iinfo(ddt.type)
  File "c:\python34-x64\lib\site-packages\numpy\core\getlimits.py", line 516, in __init__
    raise ValueError("Invalid integer data type.")
ValueError: Invalid integer data type.
</code></pre></div>
<p dir="auto">These first few are related to <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="367260736" data-permission-text="Title is private" data-url="https://github.com/numpy/numpy/issues/12093" data-hovercard-type="pull_request" data-hovercard-url="/numpy/numpy/pull/12093/hovercard" href="https://github.com/numpy/numpy/pull/12093">#12093</a>. If we can get that data, it will be easier to debug, but we will also be trying to catch the error on our end. I'm including these because when they always co-occur with other failures.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="======================================================================
ERROR: nibabel.tests.test_processing.test_spatial_axes_check
----------------------------------------------------------------------
Traceback (most recent call last):
  File &quot;c:\python34-x64\lib\site-packages\nose\case.py&quot;, line 198, in runTest
    self.test(*self.arg)
  File &quot;c:\python34-x64\lib\site-packages\numpy\testing\_private\decorators.py&quot;, line 155, in skipper_func
    return f(*args, **kwargs)
  File &quot;c:\python34-x64\lib\site-packages\nibabel\tests\test_processing.py&quot;, line 366, in test_spatial_axes_check
    out = resample_from_to(img, img, mode='nearest')
  File &quot;c:\python34-x64\lib\site-packages\nibabel\processing.py&quot;, line 180, in resample_from_to
    cval=cval)
  File &quot;c:\python34-x64\lib\site-packages\scipy\ndimage\interpolation.py&quot;, line 416, in affine_transform
    filtered = spline_filter(input, order, output=numpy.float64)
  File &quot;c:\python34-x64\lib\site-packages\scipy\ndimage\interpolation.py&quot;, line 113, in spline_filter
    spline_filter1d(input, order, axis, output=output)
  File &quot;c:\python34-x64\lib\site-packages\scipy\ndimage\interpolation.py&quot;, line 82, in spline_filter1d
    _nd_image.spline_filter1d(input, order, axis, output)
RuntimeError: array type dtype('float64') not supported
======================================================================
FAIL: autogenerated test from validate_data_interface
----------------------------------------------------------------------
Traceback (most recent call last):
  File &quot;c:\python34-x64\lib\site-packages\nose\case.py&quot;, line 198, in runTest
    self.test(*self.arg)
  File &quot;c:\python34-x64\lib\site-packages\nibabel\tests\test_api_validators.py&quot;, line 23, in meth
    validator(self, imaker, params)
  File &quot;c:\python34-x64\lib\site-packages\nibabel\tests\test_image_api.py&quot;, line 208, in validate_data_interface
    self._check_proxy_interface(imaker, meth_name)
  File &quot;c:\python34-x64\lib\site-packages\nibabel\tests\test_image_api.py&quot;, line 253, in _check_proxy_interface
    assert_true(data is data_again)
AssertionError: False is not true"><pre class="notranslate"><code class="notranslate">======================================================================
ERROR: nibabel.tests.test_processing.test_spatial_axes_check
----------------------------------------------------------------------
Traceback (most recent call last):
  File "c:\python34-x64\lib\site-packages\nose\case.py", line 198, in runTest
    self.test(*self.arg)
  File "c:\python34-x64\lib\site-packages\numpy\testing\_private\decorators.py", line 155, in skipper_func
    return f(*args, **kwargs)
  File "c:\python34-x64\lib\site-packages\nibabel\tests\test_processing.py", line 366, in test_spatial_axes_check
    out = resample_from_to(img, img, mode='nearest')
  File "c:\python34-x64\lib\site-packages\nibabel\processing.py", line 180, in resample_from_to
    cval=cval)
  File "c:\python34-x64\lib\site-packages\scipy\ndimage\interpolation.py", line 416, in affine_transform
    filtered = spline_filter(input, order, output=numpy.float64)
  File "c:\python34-x64\lib\site-packages\scipy\ndimage\interpolation.py", line 113, in spline_filter
    spline_filter1d(input, order, axis, output=output)
  File "c:\python34-x64\lib\site-packages\scipy\ndimage\interpolation.py", line 82, in spline_filter1d
    _nd_image.spline_filter1d(input, order, axis, output)
RuntimeError: array type dtype('float64') not supported
======================================================================
FAIL: autogenerated test from validate_data_interface
----------------------------------------------------------------------
Traceback (most recent call last):
  File "c:\python34-x64\lib\site-packages\nose\case.py", line 198, in runTest
    self.test(*self.arg)
  File "c:\python34-x64\lib\site-packages\nibabel\tests\test_api_validators.py", line 23, in meth
    validator(self, imaker, params)
  File "c:\python34-x64\lib\site-packages\nibabel\tests\test_image_api.py", line 208, in validate_data_interface
    self._check_proxy_interface(imaker, meth_name)
  File "c:\python34-x64\lib\site-packages\nibabel\tests\test_image_api.py", line 253, in _check_proxy_interface
    assert_true(data is data_again)
AssertionError: False is not true
</code></pre></div>
<p dir="auto">Although a caching object failing to return the identical object seems a reasonable bug, this is what led me to start thinking that it might be a bug in the <code class="notranslate">is</code> check. The cached object is an <code class="notranslate">ndarray</code>.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="======================================================================
FAIL: autogenerated test from validate_dtype
----------------------------------------------------------------------
Traceback (most recent call last):
  File &quot;c:\python34-x64\lib\site-packages\nose\case.py&quot;, line 198, in runTest
    self.test(*self.arg)
  File &quot;c:\python34-x64\lib\site-packages\nibabel\tests\test_api_validators.py&quot;, line 23, in meth
    validator(self, imaker, params)
  File &quot;c:\python34-x64\lib\site-packages\nibabel\tests\test_image_api.py&quot;, line 178, in validate_dtype
    assert_equal(img.get_data_dtype().type, params['dtype'])
AssertionError: &lt;class 'numpy.float64'&gt; != &lt;class 'numpy.float64'&gt;
======================================================================
FAIL: nibabel.tests.test_minc2.TestMinc2File.test_mincfile
----------------------------------------------------------------------
Traceback (most recent call last):
  File &quot;c:\python34-x64\lib\site-packages\nose\case.py&quot;, line 198, in runTest
    self.test(*self.arg)
  File &quot;c:\python34-x64\lib\site-packages\nibabel\tests\test_minc1.py&quot;, line 159, in test_mincfile
    assert_equal(mnc.get_data_dtype().type, tp['dtype'])
AssertionError: &lt;class 'numpy.float64'&gt; != &lt;class 'numpy.float64'&gt;
----------------------------------------------------------------------"><pre class="notranslate"><code class="notranslate">======================================================================
FAIL: autogenerated test from validate_dtype
----------------------------------------------------------------------
Traceback (most recent call last):
  File "c:\python34-x64\lib\site-packages\nose\case.py", line 198, in runTest
    self.test(*self.arg)
  File "c:\python34-x64\lib\site-packages\nibabel\tests\test_api_validators.py", line 23, in meth
    validator(self, imaker, params)
  File "c:\python34-x64\lib\site-packages\nibabel\tests\test_image_api.py", line 178, in validate_dtype
    assert_equal(img.get_data_dtype().type, params['dtype'])
AssertionError: &lt;class 'numpy.float64'&gt; != &lt;class 'numpy.float64'&gt;
======================================================================
FAIL: nibabel.tests.test_minc2.TestMinc2File.test_mincfile
----------------------------------------------------------------------
Traceback (most recent call last):
  File "c:\python34-x64\lib\site-packages\nose\case.py", line 198, in runTest
    self.test(*self.arg)
  File "c:\python34-x64\lib\site-packages\nibabel\tests\test_minc1.py", line 159, in test_mincfile
    assert_equal(mnc.get_data_dtype().type, tp['dtype'])
AssertionError: &lt;class 'numpy.float64'&gt; != &lt;class 'numpy.float64'&gt;
----------------------------------------------------------------------
</code></pre></div>
<p dir="auto">And these two amount to <code class="notranslate">numpy.float64 is numpy.float64</code> failing.</p>
<h3 dir="auto">Numpy/Python version information:</h3>
<p dir="auto">One example:</p>
<p dir="auto"><code class="notranslate">1.15.2 3.5.4 (v3.5.4:3f56838, Aug 8 2017, 02:07:06) ...</code></p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://camo.githubusercontent.com/8611a767170f2a819b89cbbfd10f67fb6d4548a44ac27f4c82c6265862fc09e3/687474703a2f2f7777772e6f6e657275737369616e2e636f6d2f746d702f676b72656c6c53686f6f745f31302d30352d31385f3135303235342e706e67"><img src="https://camo.githubusercontent.com/8611a767170f2a819b89cbbfd10f67fb6d4548a44ac27f4c82c6265862fc09e3/687474703a2f2f7777772e6f6e657275737369616e2e636f6d2f746d702f676b72656c6c53686f6f745f31302d30352d31385f3135303235342e706e67" alt="screenshot" data-canonical-src="http://www.onerussian.com/tmp/gkrellShoot_10-05-18_150254.png" style="max-width: 100%;"></a></p>
<p dir="auto">On windows 7:</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="&gt;&gt;&gt; np.cint, np.cint is np.int32
(numpy.int32, False)
&gt;&gt;&gt; np.int_, np.int_ is np.int32
(numpy.int32, True)"><pre class="notranslate"><span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">np</span>.<span class="pl-s1">cint</span>, <span class="pl-s1">np</span>.<span class="pl-s1">cint</span> <span class="pl-c1">is</span> <span class="pl-s1">np</span>.<span class="pl-s1">int32</span>
(<span class="pl-s1">numpy</span>.<span class="pl-s1">int32</span>, <span class="pl-c1">False</span>)
<span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">np</span>.<span class="pl-s1">int_</span>, <span class="pl-s1">np</span>.<span class="pl-s1">int_</span> <span class="pl-c1">is</span> <span class="pl-s1">np</span>.<span class="pl-s1">int32</span>
(<span class="pl-s1">numpy</span>.<span class="pl-s1">int32</span>, <span class="pl-c1">True</span>)</pre></div>
<p dir="auto">On 64-bit linux:</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="&gt;&gt;&gt; np.int_, np.int_ is np.int64
(numpy.int64, True)
&gt;&gt;&gt; np.longlong, np.longlong is np.int64
(numpy.int64, False)"><pre class="notranslate"><span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">np</span>.<span class="pl-s1">int_</span>, <span class="pl-s1">np</span>.<span class="pl-s1">int_</span> <span class="pl-c1">is</span> <span class="pl-s1">np</span>.<span class="pl-s1">int64</span>
(<span class="pl-s1">numpy</span>.<span class="pl-s1">int64</span>, <span class="pl-c1">True</span>)
<span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">np</span>.<span class="pl-s1">longlong</span>, <span class="pl-s1">np</span>.<span class="pl-s1">longlong</span> <span class="pl-c1">is</span> <span class="pl-s1">np</span>.<span class="pl-s1">int64</span>
(<span class="pl-s1">numpy</span>.<span class="pl-s1">int64</span>, <span class="pl-c1">False</span>)</pre></div>
<hr>
<p dir="auto">(original title: <code class="notranslate">intc</code> displays wrong class name)</p>
<p dir="auto">The string representation of <code class="notranslate">numpy.intc</code> is <code class="notranslate">&lt;class 'numpy.int32'&gt;</code>. This would fine if this were true--just a name pointing to the same object. But at least on Windows 7, <code class="notranslate">numpy.intc</code> is not the same object as <code class="notranslate">numpy.int32</code>; it's not even a subclass. This is very confusing for debugging objects of this type, as objects inexplicably fail an <code class="notranslate">isinstance</code> test.</p>
<p dir="auto">Could one of these two small changes be made:</p>
<ul dir="auto">
<li>Either make <code class="notranslate">intc</code> just be another name pointing to the object behind <code class="notranslate">int32</code></li>
<li>Or make <code class="notranslate">intc</code> print out <code class="notranslate">&lt;class 'numpy.intc'&gt;</code></li>
</ul>