[issue2263] struct.pack() + numpy int raises SystemError

engelbert gruber report at bugs.python.org
Thu Jan 29 02:05:57 CET 2009


engelbert gruber <grubert at users.sourceforge.net> added the comment:

on ubuntu 8.04, Python 2.7a0 (trunk:69044) and numpy 1.2.1
("." is OK, "e" means SystemError)

* signed always works, longlong also.
* unsigned native works half of the time
* unsigned little/big endian never works
* the numpy type does seam to have any effect.

signed char          b   'int16'   .  <.  >.  'uint32'   .  <.  >. 
sys:1: DeprecationWarning: struct integer overflow masking is deprecated
unsigned char        B   'int16'   .  <e  >e  'uint32'   .  <e  >e 
signed short         h   'int16'   .  <.  >.  'uint32'   .  <.  >. 
unsigned short       H   'int16'   .  <e  >e  'uint32'   .  <e  >e 
signed int           i   'int16'   .  <.  >.  'uint32'   .  <.  >. 
unsigned int         I   'int16'   e  <e  >e  'uint32'   e  <e  >e 
signed long          l   'int16'   .  <.  >.  'uint32'   .  <.  >. 
unsigned long        L   'int16'   e  <e  >e  'uint32'   e  <e  >e 
signed long long     q   'int16'   .  <.  >.  'uint32'   .  <.  >. 
unsigned long long   Q   'int16'   .  <.  >.  'uint32'   .  <.  >.

----------
nosy: +grubert
versions: +Python 2.7
Added file: http://bugs.python.org/file12888/issue2263-numpy.py

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue2263>
_______________________________________


More information about the Python-bugs-list mailing list