ukoethe / vigra

a generic C++ library for image analysis
http://ukoethe.github.io/vigra/
Other
407 stars 191 forks source link

make check error: Python argument types ... did not match C++ signature #503

Open ametzler opened 2 years ago

ametzler commented 2 years ago

Hello,

Building GIT head (or 1.11.1) on up to date Debian (boost 1.74, python3-dev 3.9.8-1) yields a long list of similar errors on make check.

ERROR: test1.test_MinimaMaxima
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/dev/shm/VIGRA/vigra/obj.x86_64-linux-gnu/vigranumpy/test/test1.py", line 173, in test_MinimaMaxima
    res = localMinima3D(1-data,neighborhood=26)
  File "/tmp/VIGRA/vigra/obj.x86_64-linux-gnu/vigranumpy/vigra/arraytypes.py", line 1697, in __rsub__
    return ufunc.subtract(other, self)
  File "/tmp/VIGRA/vigra/obj.x86_64-linux-gnu/vigranumpy/vigra/ufunc.py", line 296, in __call__
    o = outClass(shape, dtype=out_dtype, order='C', axistags=axistags, init=False)
  File "/tmp/VIGRA/vigra/obj.x86_64-linux-gnu/vigranumpy/vigra/arraytypes.py", line 535, in __new__
    res = _constructArrayFromOrder(cls, obj, dtype, order, init)
  File "/tmp/VIGRA/vigra/obj.x86_64-linux-gnu/vigranumpy/vigra/arraytypes.py", line 287, in _constructArrayFromOrder
    return _constructArrayFromAxistags(cls, shape, dtype, axistags, init)
Boost.Python.ArgumentError: Python argument types in
    vigra.vigranumpycore.constructArrayFromAxistags(type, tuple, numpy.dtype[float32], AxisTags, bool)
did not match C++ signature:
    constructArrayFromAxistags(boost::python::api::object, vigra::ArrayVector<long, std::allocator<long> >, NPY_TYPES, vigra::AxisTags, bool)

======================================================================
ERROR: test2.test_resize
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/dev/shm/VIGRA/vigra/obj.x86_64-linux-gnu/vigranumpy/test/test2.py", line 94, in test_resize
    checkAboutSame(i2,image)
  File "/dev/shm/VIGRA/vigra/obj.x86_64-linux-gnu/vigranumpy/test/test2.py", line 63, in checkAboutSame
    difference=np.sum(np.abs(i1-i2))/float(np.size(i1))
  File "/tmp/VIGRA/vigra/obj.x86_64-linux-gnu/vigranumpy/vigra/arraytypes.py", line 1706, in __sub__
    return ufunc.subtract(self, other)
  File "/tmp/VIGRA/vigra/obj.x86_64-linux-gnu/vigranumpy/vigra/ufunc.py", line 296, in __call__
    o = outClass(shape, dtype=out_dtype, order='C', axistags=axistags, init=False)
  File "/tmp/VIGRA/vigra/obj.x86_64-linux-gnu/vigranumpy/vigra/arraytypes.py", line 535, in __new__
    res = _constructArrayFromOrder(cls, obj, dtype, order, init)
  File "/tmp/VIGRA/vigra/obj.x86_64-linux-gnu/vigranumpy/vigra/arraytypes.py", line 287, in _constructArrayFromOrder
    return _constructArrayFromAxistags(cls, shape, dtype, axistags, init)
Boost.Python.ArgumentError: Python argument types in
    vigra.vigranumpycore.constructArrayFromAxistags(type, tuple, numpy.dtype[float32], AxisTags, bool)
did not match C++ signature:
    constructArrayFromAxistags(boost::python::api::object, vigra::ArrayVector<long, std::allocator<long> >, NPY_TYPES, vigra::AxisTags, bool)
[...]

cu Andreas

ametzler commented 2 years ago

23ad778502c6436fb6e40ade5e9fd9ddbbad9f35 from #501 lets the build go a little bit further.

ArchangeGabriel commented 2 years ago

Can confirm both the issue and the fix.