[Pythonmac-SIG] NumPy extensions on the Mac

Chris Barker cbarker@jps.net
Fri, 29 Dec 2000 13:35:37 -0800


Has anyone gotten C extensions on the Mac working with NumPy Arrays
(PyArrayObject)?

I'm having assorted problems. I have an extension I wrote on Linux, and
it works just fine there. I am having a bear of a time getting it
working on the Mac.

I'm using MacPython 1.5.2c1, and CodeWarrior Pro 5.

At the moment my problem is that 

PyArray_Check()  doesn't seem to work, it return false whether I pass in
a NumPy array or any other object. I can probably get my extension to
work without this, but I won't be able to have any type checking on the
input, and when a bad type is passed in, the results are ugly.

Has anyone gotten this working?

If you have gotten useful NumPy array based extension working, I'd love
to see any cod eyou would be willing to send me.

This has been very frustrating! It is taking me longer to get this
working ont he Mac, that it took to get the whole thing written on
Linux, ewven though I had never written a Python extension before, and
have barely written any C programs at all.

thanks for any help anyone can give.

-Chris


-- 
Christopher Barker,
Ph.D.                                                           
cbarker@jps.net                      ---           ---           ---
http://www.jps.net/cbarker          -----@@       -----@@       -----@@
                                   ------@@@     ------@@@     ------@@@
Water Resources Engineering       ------   @    ------   @   ------   @
Coastal and Fluvial Hydrodynamics -------      ---------     --------    
------------------------------------------------------------------------
------------------------------------------------------------------------