[Numpy-discussion] Yet another problem in CVS numarray

Francesc Altet faltet at carabos.com
Fri Nov 4 08:40:23 CST 2005


Hi,

I've detected another problem in CVS numarray when converting
non-contiguous Numeric objects.

With numarray 1.3.3 the next works:

>>> Numeric.__version__
'23.8'
>>> numarray.__version__
'1.3.3'
>>> num=Numeric.array([1,2,3,4],'b')
>>> num2=num[::2]
>>> num2.iscontiguous()
0
>>> na=numarray.array(num2)
>>> na
array([1, 3])

but, with CVS version of numarray:

>>> numarray.__version__
'1.4.2'
>>> Numeric.__version__
'24.1'
>>> na=numarray.array([1,2,3,4],'b')
>>> num=Numeric.array([1,2,3,4],'b')
>>> num2=num[::2]
>>> num2.iscontiguous()
0
>>> na=numarray.array(num2)
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
  File "/usr/lib/python2.4/site-packages/numarray/numarraycore.py", line 376, 
in array
    a = a.astype(type)
  File "/usr/lib/python2.4/site-packages/numarray/numarraycore.py", line 863, 
in astype
    return self.copy()
  File "/usr/lib/python2.4/site-packages/numarray/numarraycore.py", line 923, 
in copy
    c = _gen.NDArray.copy(self)
  File "/usr/lib/python2.4/site-packages/numarray/generic.py", line 724, in 
copy
    arr._itemsize)
numarray.libnumarray.error: copy1bytes: access beyond buffer. offset=2 
buffersize=2

Cheers,

-- 
>0,0<   Francesc Altet     http://www.carabos.com/
V   V   Cárabos Coop. V.   Enjoy Data
 "-"





More information about the Numpy-discussion mailing list