>
>
> sage: import rpy2.robjects as robjects
> sage: v = robjects.r(range(1000))
> sage: summary = robjects.r['summary']
> sage: %timeit summary(v)
> 625 loops, best of 3: 898 µs per loop
> sage: print(summary(v))
> Min. 1st Qu. Median Mean 3rd Qu. Max.
> 999 999 999 999 999 999
>
After changing v assignment to:
v = robjects.IntVector(range(1000))
... everything worked correctly and quickly (for my machine anyway).
sage: %timeit summary(v)
125 loops, best of 3: 1.59 ms per loop
sage: print(summary(v))
Min. 1st Qu. Median Mean 3rd Qu. Max.
0.0 249.8 499.5 499.5 749.2 999.0
Thanks!
--
You received this message because you are subscribed to the Google Groups
"sage-support" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
Visit this group at http://groups.google.com/group/sage-support?hl=en.