[Numpy-discussion] Python 2.6 and numpy 1.3.0/1.4.0 from an extension

2010-02-08 Thread Peter Notebaert
I have made an extension that also uses numpy. I developed with Python 2.6 and numpy 1.4.0 This works all fine. The problem is that users that use this extension get crahes from the moment they use the extension and this because of numpy. It crashes when numpy is initialised. This because those us

Re: [Numpy-discussion] Determine if numpy is installed from anextension

2010-02-03 Thread Peter Notebaert
endianness at runtime"); return -1; } #endif return 0; } As you can see, this routine is doing the same at the beginning with additional tests and the return value indicates if ok or not. So I only had to call PyErr_Clear(); when it failes and the problem is solved. Thanks for you

Re: [Numpy-discussion] Determine if numpy is installed from an extension

2010-02-03 Thread Peter Notebaert
0 and the error is probably still hanging and then given later. I will try this this evening. Thank you for the hints. Peter On Wed, Feb 3, 2010 at 4:22 PM, Robert Kern wrote: > On Wed, Feb 3, 2010 at 03:41, David Cournapeau wrote: > > On Wed, Feb 3, 2010 at 5:38 PM, Peter N

Re: [Numpy-discussion] Determine if numpy is installed from an extension

2010-02-03 Thread Peter Notebaert
>From an extension? How to import numpy from there and then test if that succeeded and that without any annoying message if possible... Thanks, Peter On Wed, Feb 3, 2010 at 1:34 AM, David Cournapeau wrote: > Peter Notebaert wrote: > > > How can I test if numpy is installed on

[Numpy-discussion] Determine if numpy is installed from an extension

2010-02-02 Thread Peter Notebaert
Hello, I have written a C-extension for python that uses arrays from python, does calculations on them and returns a result on that. I have now also added the possibility to provide numpy arrays. However this is not a requirement. Python arrays (lists) are still allowed also. I check in the C-