[NumPy-Tickets] [NumPy] #1605: Bug in numpy version 1.5.x
NumPy Trac
numpy-tickets@scipy....
Sat Sep 4 15:40:55 CDT 2010
#1605: Bug in numpy version 1.5.x
--------------------+-------------------------------------------------------
Reporter: maldun | Owner: somebody
Type: defect | Status: new
Priority: normal | Milestone: 1.5.1
Component: Other | Version: 1.5.0
Keywords: sage |
--------------------+-------------------------------------------------------
We tried to upgrade NumPy in Sage. We managed to get 1.4.1 working. (see
http://trac.sagemath.org/sage_trac/ticket/9808 for more info)
numpy 1.5.0 should work also, but we have problems with some of the
doctests. Example:
{{{
sage -t -valgrind
"devel/sage/sage/rings/polynomial/polynomial_element.pyx"
Total time for all tests: 716.4 seconds
maldun@zauberbuch:~/sage/sage-4.5.2$ sage -t -valgrind
"devel/sage/sage/rings/polynomial/real_roots.pyx
> "
ERROR: File ./devel/sage/sage/rings/polynomial/real_roots.pyx
is missing
----------------------------------------------------------------------
The following tests failed:
./devel/sage/sage/rings/polynomial/real_roots.pyx
# File not found
Total time for all tests: 0.0 seconds
maldun@zauberbuch:~/sage/sage-4.5.2$ sage -t -valgrind
"devel/sage/sage/rings/polynomial/real_roots.pyx"
sage -t -valgrind "devel/sage/sage/rings/polynomial/real_roots.pyx"
**********************************************************************
File
"/home/maldun/sage/sage-4.5.2/devel/sage/sage/rings/polynomial/real_roots.pyx",
line 1819, in __main__.example_76
Failed example:
oc.find_roots()###line 3064:_sage_ >>> oc.find_roots()
Expected nothing
Got:
doctest:1: RuntimeWarning: tp_compare didn't return -1 or -2 for
exception
**********************************************************************
File
"/home/maldun/sage/sage-4.5.2/devel/sage/sage/rings/polynomial/real_roots.pyx",
line 1840, in __main__.example_77
Failed example:
oc.find_roots()###line 3085:_sage_ >>> oc.find_roots()
Expected nothing
Got:
doctest:1: RuntimeWarning: tp_compare didn't return -1 or -2 for
exception
**********************************************************************
File
"/home/maldun/sage/sage-4.5.2/devel/sage/sage/rings/polynomial/real_roots.pyx",
line 1934, in __main__.example_80
Failed example:
oc.find_roots()###line 3157:_sage_ >>> oc.find_roots()
Expected nothing
Got:
doctest:1: RuntimeWarning: tp_compare didn't return -1 or -2 for
exception
**********************************************************************
File
"/home/maldun/sage/sage-4.5.2/devel/sage/sage/rings/polynomial/real_roots.pyx",
line 2320, in __main__.example_98
Failed example:
real_roots(x**Integer(5) * (x**Integer(2) - Integer(9999))**Integer(2)
- Integer(1))###line 3870:_sage_ >>> real_roots(x^5 * (x^2 - 9999)^2 -
1)
Expected:
[((-29274496381311/9007199254740992,
419601125186091/2251799813685248), 1),
((2126658450145849453951061654415153249597/21267647932558653966460912964485513216,
4253316902721330018853696359533061621799/42535295865117307932921825928971026432),
1),
((1063329226287740282451317352558954186101/10633823966279326983230456482242756608,
531664614358685696701445201630854654353/5316911983139663491615228241121378304),
1)]
Got:
doctest:1: RuntimeWarning: tp_compare didn't return -1 or -2 for
exception
[((-29274496381311/9007199254740992,
419601125186091/2251799813685248), 1),
((2126658450145849453951061654415153249597/21267647932558653966460912964485513216,
4253316902721330018853696359533061621799/42535295865117307932921825928971026432),
1),
((1063329226287740282451317352558954186101/10633823966279326983230456482242756608,
531664614358685696701445201630854654353/5316911983139663491615228241121378304),
1)]
**********************************************************************
4 items had failures:
1 of 10 in __main__.example_76
1 of 9 in __main__.example_77
1 of 10 in __main__.example_80
1 of 44 in __main__.example_98
***Test Failed*** 4 failures.
[227.6 s]
----------------------------------------------------------------------
The following tests failed:
sage -t -valgrind
"devel/sage/sage/rings/polynomial/real_roots.pyx"
Total time for all tests: 227.6 seconds
}}}
without valgrind we get memory leak
It seems that it is related to the following bug:
http://groups.google.com/group/cython-
users/browse_thread/thread/624c696293b7fe44
If this problem can be solved we could move to numpy-1.5.0 in sage.
--
Ticket URL: <http://projects.scipy.org/numpy/ticket/1605>
NumPy <http://projects.scipy.org/numpy>
My example project
More information about the NumPy-Tickets
mailing list