From ca2246798fed70e8a7bd0994f22ee9f857e9aba0 Mon Sep 17 00:00:00 2001
From: Ullrich Koethe <ullrich.koethe@iwr.uni-heidelberg.de>
Date: Fri, 30 Oct 2015 17:40:32 +0100
Subject: [PATCH] compatibility fixes for numpy 1.10

---
 vigranumpy/lib/arraytypes.py       | 678 ++++++++++++++++++-------------------
 vigranumpy/test/test_arraytypes.py | 574 +++++++++++++++----------------
 2 files changed, 628 insertions(+), 624 deletions(-)

Index: libvigraimpex-1.10.0+dfsg/vigranumpy/lib/arraytypes.py
===================================================================
--- libvigraimpex-1.10.0+dfsg.orig/vigranumpy/lib/arraytypes.py
+++ libvigraimpex-1.10.0+dfsg/vigranumpy/lib/arraytypes.py
@@ -1277,10 +1277,10 @@ class VigraArray(numpy.ndarray):
         The 'axis' parameter can be an int (axis position) or string (axis key).
         '''
         return numpy.ndarray.min(self, axis, out)
-    
+
     @_preserve_doc
     def nonzero(self):
-        res = numpy.ndarray.nonzero(self)
+        res = tuple(k.view(type(self)) for k in numpy.ndarray.nonzero(self))
         for k in xrange(len(res)):
             res[k].axistags = AxisTags(AxisInfo(self.axistags[k]))
         return res
