On 21 January 2008 at 15:17, Stefano Costa wrote:
| Package: python-rpy
| Version: 1.0.1-1
| Severity: normal
|
|
| The "small example" from python-rpy-doc
| /usr/share/doc/python-rpy-doc/rpy_html/Small-example.html
|
| fails with a segfault:
|
|
|
| >>> from rpy import *
| >>>
| >>> degrees = 4
| >>> grid = r.seq(0, 10, length=100)
| >>> values = [r.dchisq(x, degrees) for x in grid]
| >>> r.par(ann=0)
| >>> r.plot(grid, values, type='lines')
| Warning message:
| In plot.xy(xy, type, ...) :
| plot type 'lines' will be truncated to first character
| >>> Error during wrapup: C stack usage is too close to the limit
|
| *** caught segfault ***
| address 0xb496d6cc, cause 'invalid permissions'
It shouldn't crash, of course, but it is also incorrect. The following works:
from rpy import *
degrees = 4
grid = r.seq(0, 10, length=100)
values = [r.dchisq(x, degrees) for x in grid]
r.par(ann=0)
r.plot(grid, values, type='l')
as the 'type' argument to R's plot is simply 'p', 'l', 'b', ...
Greg, the following trivial patch fixes this:
[EMAIL PROTECTED]:~/src/debian/Python> diff -u rpy-1.0.1/doc/rpy.texi{.orig,}
--- rpy-1.0.1/doc/rpy.texi.orig 2007-11-15 11:12:13.000000000 -0600
+++ rpy-1.0.1/doc/rpy.texi 2008-01-21 09:52:54.000000000 -0600
@@ -302,7 +302,7 @@
>>> grid = r.seq(0, 10, length=100)
>>> values = [r.dchisq(x, degrees) for x in grid]
>>> r.par(ann=0)
->>> r.plot(grid, values, type='lines')
+>>> r.plot(grid, values, type='l')
@end example
[EMAIL PROTECTED]:~/src/debian/Python>
I just committed it to RPy's svn and will make a corrected Debian upload.
Dirk
| The entire python session becomes unusable (ctrl+d, ctrl+c don't work).
| Is this a bug or I'm missing something?
|
| Best,
| Steko
|
| --- System information. ---
| Architecture: i386
| Kernel: Linux 2.6.23-1-686
|
| Debian Release: lenny/sid
| 500 unstable ftp.it.debian.org
| 500 testing www.debian-multimedia.org
| 500 testing security.eu.debian.org
| 500 testing ftp.it.debian.org
| 500 testing debian.gfoss.it
|
| --- Package information. ---
| Depends (Version) | Installed
| =============================-+-===========
| libc6 (>= 2.7-1) | 2.7-6
| python (<< 2.6) | 2.4.4-6
| python (>= 2.4) | 2.4.4-6
| python-central (>= 0.5.8) | 0.5.15-0.1
| python-numpy | 1:1.0.4-5
| r-base-core (>= 2.6.1) | 2.6.1-2
|
|
|
|
--
Three out of two people have difficulties with fractions.
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]