Could you please verify that the attached patch resolves the issue for
you and you obtain consistent results?

meanwhile will submit pull request on github, and if you like to have it
addressed in Debian before next release of scipy -- file a bugreport

On Fri, 10 Jun 2011, Yaroslav Halchenko wrote:

> Thanks Thomas for the report,

> are you aware of the Debian bug tracking system (DBTS) and reportbug
> utility?

> Would you mind filing a bugreport so issue doesn't get forgotten -- it
> seems to persist even on current sid amd64 with scipy 0.9.0.  Should be
> marked forwarded to http://projects.scipy.org/scipy/ticket/742 .

> I am somewhat surprised that scipy community didn't take care about this
> 2 year old issue 

> On Fri, 10 Jun 2011, [email protected] wrote:

> > [Scipy-tickets] [SciPy] #742: scipy.ndimage.label crash on 64-bit linux
-- 
=------------------------------------------------------------------=
Keep in touch                                     www.onerussian.com
Yaroslav Halchenko                 www.ohloh.net/accounts/yarikoptic
From fa2570c63da69f2efcb3a32535d8bb7dcfa87603 Mon Sep 17 00:00:00 2001
From: Yaroslav Halchenko <[email protected]>
Date: Fri, 10 Jun 2011 14:13:20 -0400
Subject: [PATCH] BUG: use dedicated npy_intp instead of int to store memory
 offset in NI_Label. Closes #742

---
 scipy/ndimage/src/ni_measure.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/scipy/ndimage/src/ni_measure.c b/scipy/ndimage/src/ni_measure.c
index cfd4d4d..1aa27d9 100644
--- a/scipy/ndimage/src/ni_measure.c
+++ b/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) {
-- 
1.7.4.4

Attachment: signature.asc
Description: Digital signature

_______________________________________________
Python-modules-team mailing list
[email protected]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/python-modules-team

Reply via email to