On Thu, Jul 23, 2009 at 7:12 AM, Peter<rpy-l...@maubp.freeserve.co.uk> wrote:
> On Thu, Jul 23, 2009 at 12:02 PM, Laurent Gautier<lgaut...@gmail.com> wrote:
>>>
>>> Since x is a NumPy array these can come in different flavours, and
>>> perhaps something here is breaking rpy2 or R, e.g.
>>
>> The bug report if for rpy-1.0.x, I think.
>

In [2]: rpy.__version__
Out[2]: '1.4.0.dev7055'

Is that expected behavior?  That is the numpy release that I currently
have installed.  Note that I tested this on two machines however.  But
yes it's rpy-1.0.3 I believe.

> Sorry, you are right. I would still try making a copy of the NumPy array
> which should give you a continuous C ordered array which owns its
> own memory.
>
> Peter
>


Thanks, but I think I checked this.  When I said exactly the same, as
far as I can tell they are exactly the same.

Say exog is my x that I have imported and x is built as above from rpy
and numpy.

In [16]: x.flags
Out[16]:
  C_CONTIGUOUS : False
  F_CONTIGUOUS : True
  OWNDATA : False
  WRITEABLE : True
  ALIGNED : True
  UPDATEIFCOPY : False

In [17]: exog.flags
Out[17]:
  C_CONTIGUOUS : False
  F_CONTIGUOUS : True
  OWNDATA : False
  WRITEABLE : True
  ALIGNED : True
  UPDATEIFCOPY : False

In [18]: x.flags == exog.flags
Out[18]: True

In [19]: x.dtype
Out[19]: dtype('float64')

In [20]: exog.dtype
Out[20]: dtype('float64')

In [21]: x.shape
Out[21]: (21, 4)

In [22]: exog.shape
Out[22]: (21, 4)

I also tried making a copy of exog, so I had a C contiguous array that
owns its own data, but it was the same result.  The weird thing is
that using exog works for psi.bisquare and psi.huber, but when I try
psi.hampel I get an error about the conformability of x and the wts,
so it appears to be some sort of a dimensions issue in the iterated
weighted least squares steps for RLM.  Anyway, I've update my code to
use the array as built up from rpy for now and it works.  When I have
time I will try to dig deeper.  I might also try to reinstall rpy
tonight, though again this happened on two machines.

Cheers,

Skipper

------------------------------------------------------------------------------
_______________________________________________
rpy-list mailing list
rpy-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rpy-list

Reply via email to