[Numpy-discussion] How to call import_array() properly?
Mon Dec 27 12:09:57 CST 2010
Thanks for the good suggestion. I now see that it was purely
historical that import_array was driven (indirectly through
init_numpy) from the pure Python component of the module rather than
in the import of the C++ component, and I've changed that. However,
I'm still curious as to whether there's a more intelligent or elegant
way to drive import_array than the following code:
#if PY_MAJOR_VERSION >= 3
On Mon, Dec 27, 2010 at 8:20 AM, Robert Kern <email@example.com> wrote:
> On Sun, Dec 26, 2010 at 17:26, Bruce Sherwood <Bruce_Sherwood@ncsu.edu> wrote:
>> In my Python code I have
>> import cvisual
>> and in my C++ code I have
> The import_array() call goes into the initialization function for your
> module, e.g. initcvisual(). Do not put it into a separate function for
> the user of your module to call.
> 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
> NumPy-Discussion mailing list
More information about the NumPy-Discussion