[Numpy-discussion] Updating cython directory to pxd usage: objections?

Fernando Perez fperez.net at gmail.com
Thu Jun 19 16:16:38 EDT 2008


On Thu, Jun 19, 2008 at 2:31 AM, Stéfan van der Walt <stefan at sun.ac.za> wrote:

> You weren't the only one confused.  In fact, reading the FAQ didn't help me:
>
> http://wiki.cython.org/FAQ#head-a3d09805a03c014080feff45fe8e22024d473d62
>
> The NumPy definitions are all external, so why shouldn't they go in a .pxi?

I'm not up to speed on all the details, but the cython guys were
pretty clear on the final piece of advice, so I'm just taking it at
face value here.  I haven't followed the discussion on pxi vs pxd in
detail (there have been several on their list), but the '.pxi files
are mostly a historical artifact' argument led me to stop caring and
start using pxds for good.

> Some other questions:
>
> - There's a bug in the latest Cython annotation, preventing the
> example from compiling.  Workaround: replace "cython -a" with
> "cython".

Mmh, I have 0.9.8 (their last release) and it works for me...

> - We could also add a scons buildfile, to show how extensions are
> built with and without numscons.

Yup.

> - import_array().  Can we put it at the bottom of c_numpy.pxd, so that
> users don't have to import it every time?

Sounds fine to me, but I don't know if there could be a subtle problem
with pxds used by multiple pyx files.  I'm not comfortable enough with
cython to answer the question.

> - Author names: should we remove author names from module headers and
> add them in THANKS.txt or some other contributor list?

I left them as they were.  If we want to revisit the discussion on
per-file author tags vs per-project files that's fine, but it's a
separate discussion from the cython technical questions.

Cheers,

f



More information about the NumPy-Discussion mailing list