Re: [Rpy] numpy array memory

2011-03-15 Thread Laurent Gautier
On 3/15/11 8:28 PM, Brent Pedersen wrote: > system info below. > maybe it's internal to R: > > >> a = 1:1 >> sum(a) > [1] NA > Warning message: > In sum(a) : Integer overflow - use sum(as.numeric(.)) >> sum(as.numeric(a)) > Error: cannot allocate vector of size 1.5 Gb This is a limitation/

Re: [Rpy] numpy array memory

2011-03-15 Thread Brent Pedersen
system info below. maybe it's internal to R: > a = 1:1 > sum(a) [1] NA Warning message: In sum(a) : Integer overflow - use sum(as.numeric(.)) > sum(as.numeric(a)) Error: cannot allocate vector of size 1.5 Gb > but this works in a new session: > a = vector(length=1, mode="numer

Re: [Rpy] numpy array memory

2011-03-15 Thread Laurent Gautier
On 3/15/11 5:45 PM, Brent Pedersen wrote: > On Tue, Mar 15, 2011 at 9:40 AM, Laurent Gautier wrote: >> It can do either one of the two. >> >> http://rpy.sourceforge.net/rpy2/doc-dev/html/numpy.html?#low-level-interface >> >> >> >> L. >> > > how about in this case?:: > > >import numpy as np >

Re: [Rpy] numpy array memory

2011-03-15 Thread Brent Pedersen
On Tue, Mar 15, 2011 at 9:40 AM, Laurent Gautier wrote: > It can do either one of the two. > > http://rpy.sourceforge.net/rpy2/doc-dev/html/numpy.html?#low-level-interface > > > > L. > how about in this case?:: import numpy as np import rpy2.robjects as robjects import rpy2.robjects.numpy

Re: [Rpy] numpy array memory

2011-03-15 Thread Laurent Gautier
It can do either one of the two. http://rpy.sourceforge.net/rpy2/doc-dev/html/numpy.html?#low-level-interface L. On 3/15/11 3:52 PM, Brent Pedersen wrote: > hi, does numpy2ri make a copy of the numpy array data? or do they > share memory? it looks to me like they are sharing memory[1], but

[Rpy] numpy array memory

2011-03-15 Thread Brent Pedersen
hi, does numpy2ri make a copy of the numpy array data? or do they share memory? it looks to me like they are sharing memory[1], but just want to be sure. thanks, -brent [1] https://bitbucket.org/lgautier/rpy2/src/eafb2022875b/rpy/rinterface/array.c