|
From: Todd M. <jm...@st...> - 2005-10-28 17:59:12
|
Francesc Altet wrote: >Hi Todd, > >I've just installed numarray 1.4.1 and pass my tests over it. >Everything goes well, except some small detail: > >Python 2.4.2 (#2, Sep 29 2005, 00:23:59) >[GCC 4.0.2 (Debian 4.0.1-9)] on linux2 >Type "help", "copyright", "credits" or "license" for more information. > > >>>>import Numeric >>>>import numarray >>>>Numeric.__version__ >>>> >>>> >'24.0b2' > > >>>>numarray.__version__ >>>> >>>> >'1.4.1' > > >>>>na=numarray.array([ 51.], type=numarray.Float64) >>>>Numeric.array(na, typecode='d') >>>> >>>> >Traceback (most recent call last): > File "<stdin>", line 1, in ? >TypeError: expected a writeable buffer object > > > >This worked in 1.3.x and before. > >I hope that this is not the intended behaviour. > > This looks like a coordinated change in both numarray and Numeric. (Travis?) I updated to Numeric-24.0 and all was well. It appears the __array_data__ protocol improved to know about readonly-ness. In order to support the readonly behavior in numarray, I think the change must be made in lockstep. We could however back out support for readonly while Numeric-24.0 becomes more pervasive. Regards, Todd |