[Insight-developers] Python: Numeric vs NumArray vs Numpy (itkPyBuffer)

Mathieu Malaterre mathieu.malaterre at gmail.com
Tue Sep 29 03:27:29 EDT 2009


Hi there,

  I am reading through the code of itkPyBuffer and found:

$ cat Wrapping/WrapITK/ExternalProjects/PyBuffer/itkPyBuffer.txx
...
// Deal with slight incompatibilites between NumPy (the future, hopefully),
// Numeric (old version) and Numarray's Numeric compatibility module (also old).
#ifndef NDARRAY_VERSION
// NDARRAY_VERSION is only defined by NumPy's arrayobject.h
// In non NumPy arrayobject.h files, PyArray_SBYTE is used instead of BYTE.
#define PyArray_BYTE PyArray_SBYTE
#endif
...

  There will be an issue soon in debian as python-numarray is
deprecated so we need to transition -hopefully- to numpy.

A couple of questions:
- Does anyone use Numpy ? Is this working ?
- What is the difference in between (the patched)
Wrapping/WrapITK/ExternalProjects/PyBuffer/itkPyBuffer.txx and
Wrapping/CSwig/CommonA/itkPyBuffer.txx ?

Thanks,
-- 
Mathieu


More information about the Insight-developers mailing list