
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)
I posted this bug to the sf bugs page, but it seems to have disappeared. 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. libnumarray.error: copy4bytes: access beyond buffer. offset=3 buffersize=0
I also get this error in other situations. Simon. -- Simon Burton, B.Sc. Licensed PO Box 8066 ANU Canberra 2601 Australia Ph. 61 02 6249 6940 http://arrowtheory.com

On Mon, 23 Feb 2004 10:27:53 +1100 Simon Burton <simon@arrowtheory.com> wrote:
I posted this bug to the sf bugs page, but it seems to have disappeared. The bug remains. I've been using the CVS version. Is there anything I'm doing wrong?
OK, i think i see it now. shape=(2048,0) should be shape=(2048,). I have been using the C-API aswell, and got confused. Maybe there is a better exception to raise? Is it ever useful to have a shape=(2048,0) ? Simon. -- Simon Burton, B.Sc. Licensed PO Box 8066 ANU Canberra 2601 Australia Ph. 61 02 6249 6940 http://arrowtheory.com

On Sun, 2004-02-22 at 18:51, Simon Burton wrote:
On Mon, 23 Feb 2004 10:27:53 +1100 Simon Burton <simon@arrowtheory.com> wrote:
I posted this bug to the sf bugs page, but it seems to have disappeared. The bug remains. I've been using the CVS version. Is there anything I'm doing wrong?
OK, i think i see it now. shape=(2048,0) should be shape=(2048,). I have been using the C-API aswell, and got confused.
Maybe there is a better exception to raise? Is it ever useful to have a shape=(2048,0) ?
IMHO, it's an edge case which might come up occasionally on arrays which are intended to be resized. Eventually I intend to fix it, but making it work immediately isn't a priority.
Simon.
-- Todd Miller <jmiller@stsci.edu>

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?
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)
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. 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@stsci.edu>
participants (2)
-
Simon Burton
-
Todd Miller