#9808: Upgrade numpy to 1.5.0rc1 and scipy to 0.8
-------------------------------+--------------------------------------------
Reporter: maldun | Owner: maldun
Type: task | Status: needs_work
Priority: major | Milestone: sage-4.6
Component: packages | Keywords: numpy, scipy
Author: Stefan Reiterer | Upstream: N/A
Reviewer: | Merged:
Work_issues: |
-------------------------------+--------------------------------------------
Comment(by maldun):
Replying to [comment:13 jason]:
> FYI: Numpy 1.5 has been officially released now.
So I was right =) Til I'm done with 1.5.0rc1 1.5 is out...
So changed so far:
The following doctest had to be rewritten:
{{{
File "/home/maldun/sage/sage-4.5.2/devel/sage/doc/en/faq/faq-usage.rst",
line 341:
sage: stats.ttest_ind(list([1,2,3,4,5]),list([2,3,4,5,.6]))
Expected:
doctest...DeprecationWarning...
(0.076752955645333687, 0.94070490247380478)
Got:
(0.076752955645333687, 0.94070490247380478)
}}}
That was easy =)
The next prob was:
{{{
File "/home/maldun/sage/sage-4.5.2/devel/sage/sage/graphs/graph.py", line
615:
sage: Graph(A)
Exception raised:
Traceback (most recent call last):
File "/home/maldun/sage/sage-4.5.2/local/bin/ncadoctest.py", line
1231, in run_one_test
self.run_one_example(test, example, filename, compileflags)
File "/home/maldun/sage/sage-4.5.2/local/bin/sagedoctest.py", line
38, in run_one_example
OrigDocTestRunner.run_one_example(self, test, example, filename,
compileflags)
File "/home/maldun/sage/sage-4.5.2/local/bin/ncadoctest.py", line
1172, in run_one_example
compileflags, 1) in test.globs
File "<doctest __main__.example_1[22]>", line 1, in <module>
Graph(A)###line 615:
sage: Graph(A)
File "/home/maldun/sage/sage-4.5.2/local/lib/python/site-
packages/sage/graphs/graph.py", line 846, in __init__
data = networkx.MultiGraph(data)
File
"/home/maldun/sage/sage-4.5.2/local/lib/python2.6/networkx/classes/graph.py",
line 220, in __init__
convert.from_whatever(data,create_using=self)
File
"/home/maldun/sage/sage-4.5.2/local/lib/python2.6/networkx/convert.py",
line 157, in from_whatever
if isinstance(thing,numpy.core.defmatrix.matrix) or \
AttributeError: 'module' object has no attribute 'defmatrix'
}}}
that was also easy. defmatrix just changed from numpy.core to numpy.matrix
to numpy.matrixlib
Only changed that line in /local/lib/python2.6/networkx/classes/graph.py
Here comes now a trickier one:
{{{
sage -t -valgrind
"devel/sage/sage/rings/polynomial/polynomial_element.pyx"
Total time for all tests: 716.4 seconds
mal...@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
mal...@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
}}}
This is not the only one, but the root of evil seems to be in real_roots
(how ironic...)
more precisly: I tracked it down, with help of valgrind, to the class
ocean. Has anyone an Idea??
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/9808#comment:19>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en.