[Numpy-discussion] copy4bytes: access beyond buffer

Todd Miller jmiller at stsci.edu
Mon Feb 23 05:46:57 EST 2004


On Sun, 2004-02-22 at 18:27, Simon Burton wrote:
> I posted this bug to the sf bugs page, but it seems to have disappeared.

numarray bugs are tracked separately from Numeric bugs.  Since Numeric
was the original project, Numeric "owns" the most easily visible
tracker, "Bugs".  numarray bugs are relocated to a less visible tracker
called "Numarray Bugs" which is accessible under the Tracker menu item, 
just to the left of "Bugs".

> The bug remains. I've been using the CVS version. Is there anything I'm doing wrong?
> 
> Python 2.2.3 (#4, Feb 15 2004, 17:40:28) 
> [GCC 3.2 20020903 (Red Hat Linux 8.0 3.2-7)] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
> >>> import numarray
> >>> zeros = numarray.zeros( shape = (2048,0) )
> >>> zeros = zeros.astype( numarray.Int16 )
> Traceback (most recent call last):
>   File "<stdin>", line 1, in ?
>   File "/usr/local/lib/python2.2/site-packages/numarray/numarraycore.py", line 594, in astype
>     ufunc._copyFromAndConvert(self, retarr)
> libnumarray.error: copy4bytes: access beyond buffer. offset=3 buffersize=0
> >>> 
> 

You're not doing anything wrong.  You're hitting an edge case which
isn't well supported in numarray yet: zero element arrays. 

> I also get this error in other situations.
> 
> Simon.
-- 
Todd Miller <jmiller at stsci.edu>





More information about the NumPy-Discussion mailing list