[Rpy] rpy2.1 beta1+: problems with translated parameters

2010-03-18 Thread Luca Beltrame
Hello, 

I just updated to beta 1, and I found a problem with some of the translated 
parameters in functions.

Test case:

from rpy2.robjects.packages import importr

base = importr("base")

sequence = list(base.seq(-10, 0, length_out=2))
len(sequence)

Result: 11 # wrong

parameter = {"length.out":2}
sequence = list(base.seq(-10, 0, **parameter))
len(sequence)

Result: 2  # Correct

Is this a bug? If so, where should I report it?

-- 
Luca Beltrame, Ph.D.  - luca.beltr...@unifi.it
Post-doctoral research fellow - Duccio Cavalieri group
Department of Pharmacology, University of Firenze


signature.asc
Description: This is a digitally signed message part.
--
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev___
rpy-list mailing list
rpy-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rpy-list


Re: [Rpy] rpy2.1 beta1+: problems with translated parameters

2010-03-18 Thread Laurent Gautier
On 3/18/10 3:03 PM, Luca Beltrame wrote:
> Hello,
>
> I just updated to beta 1, and I found a problem with some of the translated
> parameters in functions.
>
> Test case:
>
> from rpy2.robjects.packages import importr
>
> base = importr("base")
>
> sequence = list(base.seq(-10, 0, length_out=2))
> len(sequence)
>
> Result: 11 # wrong
>
> parameter = {"length.out":2}
> sequence = list(base.seq(-10, 0, **parameter))
> len(sequence)
>
> Result: 2  # Correct
>
> Is this a bug?

In a way. This is because of particularities with R.
"length_out" is only defined as a parameter in base.seq_int(), and
base.seq() is calling base.seq_int(). "length_out" is passed on to 
seq_int() as part of the "..." (R's ellipsis), and therefore cannot be 
guessed during the translation.

base.seq_int() will behave like you expect.

There is a way to manually force base.seq to translate "length_out" to 
"length.out" (but that might break other things).


> If so, where should I report it?
>

About bug reports:
http://rpy.sourceforge.net/rpy2_bugs.html

Hoping this helps,


Laurent




>
>
> --
> Download Intel® Parallel Studio Eval
> Try the new software tools for yourself. Speed compiling, find bugs
> proactively, and fine-tune applications for parallel performance.
> See why Intel Parallel Studio got high marks during beta.
> http://p.sf.net/sfu/intel-sw-dev
>
>
>
> ___
> rpy-list mailing list
> rpy-list@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/rpy-list


--
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
rpy-list mailing list
rpy-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rpy-list


Re: [Rpy] 'show' not found

2010-03-18 Thread Mike Sarahan
If anyone else encounters this problem, it appears to be something
with R.  After installing R from source (2.10.1) rather than the
Ubuntu package (2.9.2), Rpy2 works as expected.



On Thu, Feb 25, 2010 at 7:07 PM, Mike Sarahan  wrote:
> Hi all,
>
> I am running Ubuntu 9.10, with R version 2.9.2.  I have this problem
> on both RPy2.1 alpha3 and the mercurial repository.  Both compile
> cleanly, and I can import rpy2.
>
> However, when I try to import robject or any of its children, I get this 
> error:
>
> ---
> LookupError                               Traceback (most recent call last)
>
> /home/msarahan/Downloads/ in ()
>
> /home/msarahan/Downloads/build/bdist.linux-x86_64/egg/rpy2/robjects/__init__.py
> in ()
>
> /home/msarahan/Downloads/build/bdist.linux-x86_64/egg/rpy2/robjects/robject.py
> in ()
>
> /home/msarahan/Downloads/build/bdist.linux-x86_64/egg/rpy2/robjects/robject.py
> in RObjectMixin()
>
> LookupError: 'show' not found
>
> --
>
> I checked the source in robject.py, and the code in rinterface.py.  I
> could not find any reference to baseenv or to show anywhere else,
> except for where it is defined as part of the RObjectMixin class.
>
> Any ideas?
>

--
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
rpy-list mailing list
rpy-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rpy-list


[Rpy] py2 and threading

2010-03-18 Thread Carson Farmer
Hi list,

I was just looking back on some old posts and there is some mention of
releasing Python's GIL being on the TODO list...
Has this been done/explored any further?
Regards,

Carson

-- 
Carson J. Q. Farmer
ISSP Doctoral Fellow
National Centre for Geocomputation
National University of Ireland, Maynooth,
http://www.carsonfarmer.com/

--
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
rpy-list mailing list
rpy-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rpy-list