On 2011-04-25 17:11, Artur Wroblewski wrote: > Hello, > > Please take a look at > >>>> import rpy2.robjects as ro >>>> ro.FloatVector([ro.NA_Real, 1, 2, 3, ro.NA_Real]) > <FloatVector - Python:0x2b44e60 / R:0x2603008> > [0.000000, 1.000000, 2.000000, 3.000000, 0.000000] > > Why NA_Real is converted to 0.0? Is it a bug or designed behaviour?
Bug. There is no conversion (see below), it's only the representation of the NA_Real elements within a vector that is incorrect. >>> import rpy2.robjects as ro >>> ro.FloatVector([ro.NA_Real, 1, 2, 3]) <FloatVector - Python:0x3169ab8 / R:0x20446c0> [0.000000, 1.000000, 2.000000, 3.000000] >>> ro.FloatVector([ro.NA_Real, 1, 2, 3])[0] NA_real_ >>> L. > Best regards, > > w > > > ------------------------------------------------------------------------------ > Fulfilling the Lean Software Promise > Lean software platforms are now widely adopted and the benefits have been > demonstrated beyond question. Learn why your peers are replacing JEE > containers with lightweight application servers - and what you can gain > from the move. http://p.sf.net/sfu/vmware-sfemails > _______________________________________________ > rpy-list mailing list > rpy-list@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/rpy-list ------------------------------------------------------------------------------ Fulfilling the Lean Software Promise Lean software platforms are now widely adopted and the benefits have been demonstrated beyond question. Learn why your peers are replacing JEE containers with lightweight application servers - and what you can gain from the move. http://p.sf.net/sfu/vmware-sfemails _______________________________________________ rpy-list mailing list rpy-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rpy-list