Skip to content


Subversion checkout URL

You can clone with
Download ZIP


BUG: use dedicated npy_intp instead of int to store memory offset in NI_Label. Closes #742 #31

wants to merge 1 commit into from

2 participants


There was request on the Debian python-modules mailing list, so I looked into the issue and came up with a tentative patch. I haven't had a chance to test extensively, but the patch seems to be minimal enough ;-)

Thanks in advance

pv commented

Thanks, this one is a no-brainer. Applied in 2a2d8be

@pv pv closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jun 10, 2011
  1. @yarikoptic
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 1 deletion.
  1. +1 −1  scipy/ndimage/src/ni_measure.c
2  scipy/ndimage/src/ni_measure.c
@@ -132,7 +132,7 @@ int NI_Label(PyArrayObject* input, PyArrayObject* strct,
Int32 neighbor = 0;
/* iterate over structuring element: */
for(ll = 0; ll < filter_size; ll++) {
- int offset = oo[ll];
+ npy_intp offset = oo[ll];
if (offset != mask_value) {
Int32 tt = *(Int32*)(po + offset);
if (tt > 0) {
Something went wrong with that request. Please try again.