On Mon, Feb 28, 2011 at 1:05 PM, Laurent Gautier <lgaut...@gmail.com> wrote:
>> Indeed, you mentioned NA_Real, but what else can be put in FloatVector
>> beside float number? Some R's NULL representation? What about NaN?
[...]
> rinterface.NULL is not accepted (for I believe R's behaviour is confusing).
> Nan in Python /is/ a flot, and R is using the IEEE standard for NaN: it will
> be accepted as such.

So, while building FloatVector, the following is accepted (please correct
me if I miss anything)
- float number, i.e. 1.01 -> the same in R
- float('nan') -> NaN in R
- NA_Real aka NA_Float -> NA in R...

... it seems, that in case of Python's None, there is no other choice but
to convert it to NA_Real? IMHO, such conversion is perfect job for rpy.

>>> Because constructor overloading (or method overloading in general)
>>> is not possible in Python, and that *Vectors can be built from many
>>> things.
>>
>> I believe, all those "many things", will be just iterables (every
>> container in Python) with length operator implemented (could be
>> optional as we discussed earlier).
I understand. IMHO, getting rid of additional dictionary in favour
of just parameters saves us a bit a
>
> Since there is no overloading, more cases means more logic in the
> constructor: that more work for implementation, maintenance, and a hit on
> performances (all that for questionable benefits).
> Not to say that it will never happen, but definitely not in the 2.2.x
> series.

Actually, I am suggesting to accept iterables as parameters and
to get rid of dictionary based constructor. IMHO, such approach is more
consistent with Python, i.e.

    >>> dict(a=1, b=2, c=3)
    {'a': 1, 'c': 3, 'b': 2}

Best regards,

Artur

------------------------------------------------------------------------------
Free Software Download: Index, Search & Analyze Logs and other IT data in 
Real-Time with Splunk. Collect, index and harness all the fast moving IT data 
generated by your applications, servers and devices whether physical, virtual
or in the cloud. Deliver compliance at lower cost and gain new business 
insights. http://p.sf.net/sfu/splunk-dev2dev 
_______________________________________________
rpy-list mailing list
rpy-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rpy-list

Reply via email to