[Numpy-discussion] Possible bug in scalar * array

Nadav Horesh nadavh at visionsense.com
Tue Oct 21 09:15:06 CDT 2003


You have to convert ta to an (Unsigned)Int8 in order to make it work:

ta = N.array([0, 255, 255, 255,0,0,0], N.UnsignedInt8)
.......................................^^^^^^^^^^^^^^

The default integer type is 32 bits signed.

 Nadav.

-----Original Message-----
From:	Francesc Alted [mailto:falted at openlc.org]
Sent:	Tue 21-Oct-03 09:53
To:	numpy-discussion
Cc:	
Subject:	Re: [Numpy-discussion] Possible bug in scalar * array
A Dilluns 20 Octubre 2003 21:36, Todd Miller va escriure:
> I talked this over with Perry and we concluded that it's probably a good
> thing to trap the out of range scalar values before using them.  Thus,
> we're proposing to fix the error handling,  but to make the calls in
> question raise an overflow exception on the first call.  We are
> interested in hearing other opinions however.  Comments?

You mean implementing range checking in numarray objects? In my opinion,
that would be a very nice feature, although I don't know how that would
affect the assignment performance.

-- 
Francesc Alted



-------------------------------------------------------
This SF.net email is sponsored by OSDN developer relations
Here's your chance to show off your extensive product knowledge
We want to know what you know. Tell us and you have a chance to win $100
http://www.zoomerang.com/survey.zgi?HRPT1X3RYQNC5V4MLNSV3E54
_______________________________________________
Numpy-discussion mailing list
Numpy-discussion at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/numpy-discussion







More information about the Numpy-discussion mailing list