[Numpy-discussion] Impossibility to build nipy on recent numpy?

Robert Kern robert.kern@gmail....
Wed Dec 9 15:39:56 CST 2009

On Wed, Dec 9, 2009 at 15:31, Gael Varoquaux
<gael.varoquaux@normalesup.org> wrote:
> In the nipy project, we have cython-generated C files checked in.
> With the latest numpy I get the following run-time failure:
> "/home/varoquau/dev/nipy-trunk/nipy/neurospin/register/iconic_matcher.py",
> line 6, in <module>
>    from routines import _joint_histogram, _similarity,
> similarity_measures
>  File "numpy.pxi", line 74, in nipy.neurospin.register.routines
> (nipy/neurospin/register/routines.c:6042)
> ValueError: numpy.dtype does not appear to be the correct type object
> Where routines.c is a cython-generated file. I suspect that this is due
> to the recent change in the size of the struct representing numpy arrays.
> With other projects, it was sufficient to recompile the project to avoid
> this problem. With nipy it is not. Could that be because the
> cython-generated C file encodes the size of the numpy array struct, and
> has been compiled with a different numpy?

I wouldn't think so (Cython itself doesn't know the size; it should
rely on using sizeof() in the C code), but it's your file. You tell

> If this is the case, I think that it means that we need to all use the
> same version of numpy (1.3).
> Does anybody know if the cython folks are going to work around that
> anytime soon (I am not on the cython mailing list, so I am not asking
> there)?


Robert Kern

"I have come to believe that the whole world is an enigma, a harmless
enigma that is made terrible by our own mad attempt to interpret it as
though it had an underlying truth."
  -- Umberto Eco

More information about the NumPy-Discussion mailing list