[Numpy-discussion] Test cases for integer behvaiour

Arink Verma arinkverma at iitrpr.ac.in
Sat Aug 17 10:27:52 EDT 2013


Hi All,

For scalar operations Numpy first try to extract the underlying C value
from a Python Integers. It causes bottleneck because it first converts the
Python scalar into its matching NumPy scalar (e.g. PyLong -> int32) and
then it extracts the C value from the NumPy scalar.

Its quicker to just extract the value directly from the Python scalar. Raul
did it for float but for integers case is different as it get handled by
different OS differently. There are basically two standards for long on 64
bit os, Microsoft uses long = int (32 bits), linux uses long = long long
(64 bits).

Hence, before getting into above mentioned modifications, there is need to
have much test case to ensure behaviour of integer remains same. I have
written fews at pr #3592 <https://github.com/numpy/numpy/pull/3592>

-
Arink
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20130817/dfea3bb3/attachment.html>


More information about the NumPy-Discussion mailing list