[Numpy-discussion] NumPy/Numeric/PyArray_Check

Fred Clare fred at ucar.edu
Tue Mar 7 16:48:03 EST 2006


I have been a long-time Numeric user and have just started
to use numpy-0.9.5 on a Mac running OS X Version 10.3.9.
I installed NumPy in the same Python that has Numeric 24.2
installed.  In using Numeric in my Python codes I have used
only "import Numeric" for the import.  After having installed
"numpy" I replaced "import Numeric" with "import numpy as Numeric".
All seems to go O.K. until I call a function in a module that
uses Numeric (and not numpy) to create an array in my
Python script.  When I pass this Numeric array to a function in an
extension module (that was compiled using the arrayobject.h
from the NumPy distribution) and do a "PyArray_Check" on the
Numeric array, it returns false.  Is here a way around this?
Based on the statement in the "Guide to NumPy" that Numeric
and NumPy can be used simultaneously I was hoping that this
would work.

Fred Clare





More information about the NumPy-Discussion mailing list