[Numpy-discussion] RuntimeWarning: Item size computed from the PEP 3118

Laurent Gautier lgautier at gmail.com
Wed Nov 17 02:40:50 EST 2010


Hi,

I am developping a package using the buffer interface, and with Python
2.7 - Numpy 1.5, the following annoying warning has been reported.

__main__:1: RuntimeWarning: Item size computed from the PEP 3118
buffer format string does not match the actual item size.

Beside warning it appears that all is fine.

The source of the warning can be traced down the C level with the
following boolean expression being true:

descr->elsize != view->itemsize

I tried tracing a bit further but I am a little confused by what is
the intent (a lot of nested calls).

my buffer format is 'f', and the view has itemsize set as:
view->itemsize = sizeof(double);


Any pointer regarding what might be going on ?

Thanks,


Laurent



More information about the NumPy-Discussion mailing list