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