Gentoo Archives: gentoo-science

From: "François Bissey" <f.r.bissey@×××××××××.nz>
To: gentoo-science@l.g.o
Subject: Re: [gentoo-science] [sage-on-gentoo]mpmath testing
Date: Tue, 19 Oct 2010 09:46:15
Message-Id: 201010192245.49664.f.r.bissey@massey.ac.nz
In Reply to: Re: [gentoo-science] [sage-on-gentoo]mpmath testing by Steven Trogdon
1 > On 10/18/10 - 06:47:25, François Bissey wrote:
2 > > After sympy I would like testing report on mpmath.
3 > >
4 > > mpmath has an interesting relationship with sage.
5 > > sage includes mpmath and if mpmath finds sage it uses bits of it.
6 > >
7 > > So I'd like to know what sage-on-gentoo users get when
8 > > they do "import mpmath" from a python2.6 shell.
9 > > I'd like reports of success as well as error along with
10 > > the version of sage installed (4.5.3, 4.6alpha3 or other).
11 > >
12 > > Thanks,
13 > > Francois
14 >
15 > Here with Sage 4.5.3 from a python shell; import sage.all, import sympy
16 > or import mpmath all produce the expected result - one is returned to
17 > the python prompt after the import. With Sage 4.6alpha3 if each import
18 > is performed from a separate python shell then each import returns
19 >
20 > Traceback (most recent call last):
21 > File "/usr/bin/sage-cleaner", line 25, in <module>
22 > DOT_SAGE = os.environ['DOT_SAGE']
23 > File "/usr/lib/python2.6/UserDict.py", line 22, in __getitem__
24 > raise KeyError(key)
25 > KeyError: 'DOT_SAGE'
26 >
27 > If from the same python shell the three imports are performed then only
28 > the first import returns the Traceback.
29 >
30 Thank you Steve,
31
32 Could you send me the result of
33 printenv | grep SAGE
34 from the machine running sage-4.5.3. For mpmath with sage-4.6alpha3
35 I was expecting this error:
36 >>> import mpmath
37 Traceback (most recent call last):
38 File "<stdin>", line 1, in <module>
39 File "/usr/lib/python2.6/site-packages/mpmath/__init__.py", line 6, in
40 <module>
41 from ctx_mp import MPContext
42 File "/usr/lib/python2.6/site-packages/mpmath/ctx_mp.py", line 48, in
43 <module>
44 from sage.libs.mpmath.ext_main import Context as BaseMPContext
45 File "integer.pxd", line 9, in init sage.libs.mpmath.ext_main
46 (sage/libs/mpmath/ext_main.c:22894)
47 File "integer.pyx", line 165, in init sage.rings.integer
48 (sage/rings/integer.c:33926)
49 File "/usr/lib/python2.6/site-packages/sage/rings/infinity.py", line 200, in
50 <module>
51 import sage.rings.rational
52 File "rational.pyx", line 70, in init sage.rings.rational
53 (sage/rings/rational.c:25264)
54 File "real_mpfr.pyx", line 1, in init sage.rings.real_mpfr
55 (sage/rings/real_mpfr.c:31325)
56 File "complex_number.pxd", line 8, in init sage.libs.mpmath.utils
57 (sage/libs/mpmath/utils.c:7374)
58 File "complex_double.pxd", line 13, in init sage.rings.complex_number
59 (sage/rings/complex_number.c:18312)
60 File "complex_double.pyx", line 95, in init sage.rings.complex_double
61 (sage/rings/complex_double.c:16534)
62 File "/usr/lib/python2.6/site-packages/sage/rings/complex_field.py", line 89,
63 in ComplexField
64 C = ComplexField_class(prec)
65 File "/usr/lib/python2.6/site-packages/sage/rings/complex_field.py", line
66 187, in __init__
67 ParentWithGens.__init__(self, self._real_field(), ('I',), False, category =
68 Fields())
69 File "/usr/lib/python2.6/site-packages/sage/rings/complex_field.py", line
70 240, in _real_field
71 self.__real_field = real_mpfr.RealField(self._prec)
72 File "real_mpfr.pyx", line 267, in sage.rings.real_mpfr.RealField
73 (sage/rings/real_mpfr.c:4222)
74 TypeError: 'NoneType' object is unsubscriptable
75 >
76
77 ----------------
78 I posted about it on the sage-release, where we talk about the sage-4.6 pre
79 releases, and no one else has the problem so far. If you don't have it either
80 that may be a problem on my machine.
81
82 Francois

Replies

Subject Author
Re: [gentoo-science] [sage-on-gentoo]mpmath testing Steven Trogdon <strogdon@×××××.edu>