[Numpy-discussion] switching from Numeric to numpy

Charles R Harris charlesr.harris at gmail.com
Mon Oct 7 20:04:39 EDT 2013

On Mon, Oct 7, 2013 at 5:27 PM, john fernando <fernando.j at inbox.com> wrote:

> I have the following C code which is an extension to my python code.
> The python and C code use
> #include <Numeric/arrayobject.h>
> what is the equivalent I can use in numpy that causes the minimum code
> change?
> I did look through the old messages but didn't really find the answer-any
> help to a novice just starting out in numpy/python/C is much appreciated.

I haven't done any porting myself, but you might want to look at
numpy/oldnumeric to see how compatibility is done. That module is gone in
numpy master, but is included in earlier versions. As to the include, for
numpy it is `<numpy/arrayobject.h>, but a lot of things have been
added/changed/deprecated. There are also two scripts in oldnumeric that
help translating numeric to numpy: alter_code1.py and alter_code2.py. I
haven't used either.

There are probably folks on the list who can give you more specific advice.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20131007/e95c4ce9/attachment.html>

More information about the NumPy-Discussion mailing list