[Scipy-tickets] [SciPy] #1238: Numpy.mod fails after call to scipy.lib.lapack.flapack.dsyevr

SciPy Trac scipy-tickets@scipy....
Sat Jul 17 12:47:25 CDT 2010


#1238: Numpy.mod fails after call to scipy.lib.lapack.flapack.dsyevr
-----------------------+----------------------------------------------------
 Reporter:  cjgohlke   |       Owner:  somebody
     Type:  defect     |      Status:  new     
 Priority:  normal     |   Milestone:  0.8.0   
Component:  scipy.lib  |     Version:  0.7.0   
 Keywords:             |  
-----------------------+----------------------------------------------------
 This artifact was discussed at http://mail.scipy.org/pipermail/scipy-
 dev/2010-July/015237.html

 Using numpy 1.4.1 and scipy 0.8rc3 built with msvc9, ifort 11.1.065, and
 MKL 10.2.5.1, on Python 2.6.5 (64 bit) for Windows I get the following
 scipy.ndimage.test failure when run in the context of scipy.test().
 ndimage.test() run by itself passes all tests.

 {{{
 FAIL: extrema 3
 ----------------------------------------------------------------------
 Traceback (most recent call last):
    File "C:\Python26\lib\site-
 packages\scipy\ndimage\tests\test_ndimage.py",
 line 3149, in test_extrema03
      self.failUnless(numpy.all(output1[2]  == output4))
 AssertionError
 }}}


 This failure can be reduced to the following:


 {{{
 In [1]: import numpy

 In [2]: from scipy.lib.lapack.flapack import dsyevr

 In [3]: numpy.mod(1., 1)
 Out[3]: 0.0

 In [4]: dsyevr(numpy.array([[1,2,3],[2,2,3],[3,3,6]]))
 Out[4]:
 (array([-0.66992434,  0.48769389,  9.18223045]),
   array([[ 0.87881028, -0.25679224,  0.40218185],
         [-0.432995  , -0.78333614,  0.44598186],
         [-0.20051889,  0.56607617,  0.79959361]]),
   0)

 In [5]: numpy.mod(1., 1)
 Out[5]: nan                           # <--- wrong

 In [6]: numpy.mod(1., 1)
 Out[6]: 0.0

 }}}


 The first call to numpy.mod() after calling dsyevr() returns a wrong
 result (NaN). The output of dsyevr is correct. Numpy.mod returns the
 correct result when using a slightly different input matrix for dsyevr,
 e.g. [[1,2,3],[2,1,3],[3,3,6]]. This artifact is specific for the 64 bit
 version.

-- 
Ticket URL: <http://projects.scipy.org/scipy/ticket/1238>
SciPy <http://www.scipy.org>
SciPy is open-source software for mathematics, science, and engineering.


More information about the Scipy-tickets mailing list