Re: [Numpy-discussion] PY_ARRAY_UNIQUE_SYMBOL is too far reaching?

2010-05-06 Thread Charles R Harris
On Thu, May 6, 2010 at 3:08 AM, Austin Bingham wrote: > >> they'd likely crash. > > > > Really? > > I base that on the assumption that they'd not know to call > import_array() in that translation unit. This seems like a reasonable > assumption because, by defining the macros as such, they are stro

Re: [Numpy-discussion] PY_ARRAY_UNIQUE_SYMBOL is too far reaching?

2010-05-06 Thread Charles R Harris
On Thu, May 6, 2010 at 8:21 AM, Charles R Harris wrote: > > > On Thu, May 6, 2010 at 3:08 AM, Austin Bingham > wrote: > >> >> they'd likely crash. >> > >> > Really? >> >> I base that on the assumption that they'd not know to call >> import_array() in that translation unit. This seems like a reaso

Re: [Numpy-discussion] PY_ARRAY_UNIQUE_SYMBOL is too far reaching?

2010-05-06 Thread Austin Bingham
>> they'd likely crash. > > Really? I base that on the assumption that they'd not know to call import_array() in that translation unit. This seems like a reasonable assumption because, by defining the macros as such, they are strongly implying that they expect the API functions to be imported for

Re: [Numpy-discussion] PY_ARRAY_UNIQUE_SYMBOL is too far reaching?

2010-05-06 Thread Hans Meine
Am Donnerstag 06 Mai 2010 08:10:35 schrieb Austin Bingham: > Suppose I defined neither macro in my 'util.h', and that I included > 'arrayobject.h'. If a user of my library did this: > > #include // <-- my library's header > > #define PY_ARRAY_UNIQUE_SYMBOL MY_UNIQUE_SYMBOL > #define NO_IMP

Re: [Numpy-discussion] PY_ARRAY_UNIQUE_SYMBOL is too far reaching?

2010-05-05 Thread Austin Bingham
> I still don't understand why you cannot just include the header file as > is (without defining any of NO_IMPORT/PY_ARRAY_UNIQUE_SYMBOL). I guess the real point is that no matter what definition (or lack thereof) that I have for these macros, I still introduce header order dependencies to users o

Re: [Numpy-discussion] PY_ARRAY_UNIQUE_SYMBOL is too far reaching?

2010-05-05 Thread David
On 05/04/2010 04:38 PM, Austin Bingham wrote: > > I admit I'm having trouble formulating questions to address my > problems, so please bear with me. > > Say I've got a shared library of utilities for working with numpy > arrays. It's intended to be used in multiple extension modules and in > some

Re: [Numpy-discussion] PY_ARRAY_UNIQUE_SYMBOL is too far reaching?

2010-05-04 Thread Austin Bingham
On Tue, May 4, 2010 at 7:05 AM, David Cournapeau wrote: > On Mon, May 3, 2010 at 7:23 PM, Austin Bingham > wrote: >> Hi everyone, >> >> I've recently been developing a python module and C++ library in >> parallel, with core functionality in python and C++ largely just >> layered on top of the py

Re: [Numpy-discussion] PY_ARRAY_UNIQUE_SYMBOL is too far reaching?

2010-05-03 Thread David Cournapeau
On Mon, May 3, 2010 at 7:23 PM, Austin Bingham wrote: > Hi everyone, > > I've recently been developing a python module and C++ library in > parallel, with core functionality in python and C++ largely just > layered on top of the python (with boost.python.) In some cases, > however, for performance

[Numpy-discussion] PY_ARRAY_UNIQUE_SYMBOL is too far reaching?

2010-05-03 Thread Austin Bingham
Hi everyone, I've recently been developing a python module and C++ library in parallel, with core functionality in python and C++ largely just layered on top of the python (with boost.python.) In some cases, however, for performance reasons, the C++ API "reaches into" the python code via the C API

Re: [Numpy-discussion] PY_ARRAY_UNIQUE_SYMBOL

2008-05-21 Thread Bill Spotz
On May 21, 2008, at 5:15 PM, Robert Kern wrote: > On Wed, May 21, 2008 at 3:34 PM, Bill Spotz <[EMAIL PROTECTED]> > wrote: >> I am running into a problem with a numpy-compatible extension module >> that I develop, and I believe it has to do with >> PY_ARRAY_UNIQUE_SYMBOL. >> >> I set PY_ARRAY_

Re: [Numpy-discussion] PY_ARRAY_UNIQUE_SYMBOL

2008-05-21 Thread Robert Kern
On Wed, May 21, 2008 at 3:34 PM, Bill Spotz <[EMAIL PROTECTED]> wrote: > I am running into a problem with a numpy-compatible extension module > that I develop, and I believe it has to do with PY_ARRAY_UNIQUE_SYMBOL. > > I set PY_ARRAY_UNIQUE_SYMBOL to "PyTrilinos". Why? My understanding is also li

[Numpy-discussion] PY_ARRAY_UNIQUE_SYMBOL

2008-05-21 Thread Bill Spotz
I am running into a problem with a numpy-compatible extension module that I develop, and I believe it has to do with PY_ARRAY_UNIQUE_SYMBOL. I set PY_ARRAY_UNIQUE_SYMBOL to "PyTrilinos". On my machine (Mac OS X), the module loads and works properly. Another user, however (on Ubuntu), gets