ukoethe/vigra — Issue #94: ufuncs do not work with plain ndarrays anymore
Author: hmeine
Created: 2011-11-16 19:33:21+00:00
State: open

When trying to make an older vigranumpy app work with the current vigra version, I got exceptions like this:

```
Traceback (most recent call last):
File "/usr/lib/pymodules/python2.7/nose/case.py", line 186, in runTest
self.test(*self.arg)
File "/home/hmeine/vigra/build/vigranumpy/test/test_arraytypes.py", line 1390, in testUfuncs
b = a + a.view(numpy.ndarray)
File "/home/hmeine/vigra/build/vigranumpy/vigra/arraytypes.py", line 1317, in __add__
return ufunc.add(self, other)
File "/home/hmeine/vigra/build/vigranumpy/vigra/ufunc.py", line 257, in __call__
a2 = arg2.transposeToNumpyOrder()
AttributeError: 'numpy.ndarray' object has no attribute 'transposeToNumpyOrder'
```

There is a larger if-branch in ufunc.py dealing with the RHS if it is an instance of ndarray, obviously assuming that it will then be a VigraArray as well. I am not sure how to fix this, but I checked in a test into my forked vigra repo, see https://github.com/hmeine/vigra/ .