From: Darren D. <dd...@co...> - 2004-10-10 19:47:26
|
Hello, I am getting invalid numeric result exceptions when dividing a complex array by zero. Is this the desired behavior? Also, while trying to find a way around the above problem, I ran ieeespecial.test and got the following output. I am running numarray 1.1 on python 2.3.3. Todd, this might be correlated with the numerix package in matplotlib. I tried importing numarray and ieeespecial without matplotlib and the ieeespecial.test was successful. Thanks, Darren In [31]: ieeespecial.test() Out[31]: inf ***************************************************************** Failure in example: inf # the repr() of inf may vary from platform to platform from line #6 of numarray.ieeespecial Expected: inf Got: Out[31]: nan ***************************************************************** Failure in example: nan # the repr() of nan may vary from platform to platform from line #8 of numarray.ieeespecial Expected: nan Got: Out[31]: (array([0, 2]), array([0, 3])) ***************************************************************** Failure in example: getinf(b) from line #20 of numarray.ieeespecial Expected: (array([0, 2]), array([0, 3])) Got: Out[31]: array([[ 999., 1., 2., 3.], [ 4., 5., 6., 7.], [ 8., 9., 10., 999.], [ 12., 13., 14., 15.]]) ***************************************************************** Failure in example: a from line #26 of numarray.ieeespecial Expected: array([[ 999., 1., 2., 3.], [ 4., 5., 6., 7.], [ 8., 9., 10., 999.], [ 12., 13., 14., 15.]]) Got: Out[31]: (array([0, 1, 2]), array([1, 2, 3])) ***************************************************************** Failure in example: getnan(a) from line #35 of numarray.ieeespecial Expected: (array([0, 1, 2]), array([1, 2, 3])) Got: ***************************************************************** 1 items had failures: 5 of 11 in numarray.ieeespecial ***Test Failed*** 5 failures. Out[31]: (5, 11) -- Darren |
From: Todd M. <jm...@st...> - 2004-10-11 00:29:56
|
On Sun, 2004-10-10 at 15:47, Darren Dale wrote: > Hello, > > I am getting invalid numeric result exceptions when dividing a complex array > by zero. Is this the desired behavior? This is what I would have expected, and examining the definition I have for complex division in numarray/Include/numarray/numcomplex.h, I don't see a problem. The definition should probably be checked by an extra set of eyes. Looks OK to me. > Also, while trying to find a way around the above problem, I ran > ieeespecial.test and got the following output. I am running numarray 1.1 on > python 2.3.3. Todd, this might be correlated with the numerix package in > matplotlib. I tried importing numarray and ieeespecial without matplotlib and > the ieeespecial.test was successful. > I tried this with an ordinary Python shell and ieeespecial.test() completed without errors. Looking at your test output, I noticed it was skewed, and guessed there was an I/O synchronization issue messing up doctest. I tried the same test under IPython w/o matplotlib and duplicated your results, so I think the problem is an IPython/doctest issue. Regards, Todd > Thanks, > > Darren > > > In [31]: ieeespecial.test() > Out[31]: inf > ***************************************************************** > Failure in example: > inf # the repr() of inf may vary from platform to platform > from line #6 of numarray.ieeespecial > Expected: inf > Got: > Out[31]: nan > ***************************************************************** > Failure in example: > nan # the repr() of nan may vary from platform to platform > from line #8 of numarray.ieeespecial > Expected: nan > Got: > Out[31]: (array([0, 2]), array([0, 3])) > ***************************************************************** > Failure in example: getinf(b) > from line #20 of numarray.ieeespecial > Expected: (array([0, 2]), array([0, 3])) > Got: > Out[31]: > array([[ 999., 1., 2., 3.], > [ 4., 5., 6., 7.], > [ 8., 9., 10., 999.], > [ 12., 13., 14., 15.]]) > ***************************************************************** > Failure in example: a > from line #26 of numarray.ieeespecial > Expected: > array([[ 999., 1., 2., 3.], > [ 4., 5., 6., 7.], > [ 8., 9., 10., 999.], > [ 12., 13., 14., 15.]]) > Got: > Out[31]: (array([0, 1, 2]), array([1, 2, 3])) > ***************************************************************** > Failure in example: getnan(a) > from line #35 of numarray.ieeespecial > Expected: (array([0, 1, 2]), array([1, 2, 3])) > Got: > ***************************************************************** > 1 items had failures: > 5 of 11 in numarray.ieeespecial > ***Test Failed*** 5 failures. > Out[31]: (5, 11) -- |