summaryrefslogtreecommitdiff
path: root/numpy/lib/tests/test_function_base.py
diff options
context:
space:
mode:
authorMichael Hudson-Doyle <michael.hudson@canonical.com>2019-10-24 21:46:00 +1300
committerMichael Hudson-Doyle <michael.hudson@canonical.com>2019-10-24 22:39:12 +1300
commitaf36784b2b38577a87208003d6827d02dc0c0fc2 (patch)
treef2caba8ebe4eafb608db59d6ab43146f49edcea0 /numpy/lib/tests/test_function_base.py
parentc10d66ab8e153d944dc705434c5733d0e8249926 (diff)
downloadnumpy-af36784b2b38577a87208003d6827d02dc0c0fc2.tar.gz
BUG: fix integer size confusion in handling array's ndmin argument
The ndmin local variable was changed from an "int" to an "npy_intp" but &ndmin is passed to PyArg_ParseTupleAndKeywords against a "i" argument spec, but these integers have different sizes (well on an LP64 platform anyway). This actually works on a little endian system but fails on a big endian one. Fix this by converting the local back to an int, and being a little careful before assigning the result of PyLong_AsLong to it. Fixes #14767
Diffstat (limited to 'numpy/lib/tests/test_function_base.py')
0 files changed, 0 insertions, 0 deletions