[Cython] PXD file for overriding math functions

2012-05-02 Thread Ian Bell
Ok, I think I am missing something - I am a bit lost in the Cython jargon. Here is where I stand, let me know where I am going wrong... I compiled with cython.py -a test.py, but it isn't working. If I am completely not on the right track, feel free to let me know :) Ian # test.py (Pure pyt

Re: [Cython] Conditional import in pure Python mode

2012-05-02 Thread Stefan Behnel
Stefan Behnel, 01.05.2012 21:14: > 1) Write up a math.pxd that contains declarations equivalent to Python's > math module. Note that this may not be entirely trivial because the math > module does some error handling and type special casing under the hood. Having taken a slightly deeper look at th

Re: [Cython] Conditional import in pure Python mode

2012-05-02 Thread Robert Bradshaw
On Wed, May 2, 2012 at 12:33 AM, Stefan Behnel wrote: > Robert Bradshaw, 02.05.2012 08:56: >> On Tue, May 1, 2012 at 1:02 PM, Stefan Behnel wrote: >>> Francesc Alted, 01.05.2012 21:49: On 5/1/12 2:39 PM, mark florisson wrote: > On 1 May 2012 20:22, Stefan Behnel wrote: >> Stefan Behne

Re: [Cython] [cython-users] cimport numpy fails with Python 3 semantics

2012-05-02 Thread Stefan Behnel
Robert Bradshaw, 02.05.2012 09:15: > On Sun, Apr 29, 2012 at 11:48 PM, Stefan Behnel wrote: >> mark florisson, 28.04.2012 21:57: >>> On 28 April 2012 19:50, Stefan Behnel wrote: mark florisson, 28.04.2012 20:33: > I think each module should have its own language level, so I think > tha

Re: [Cython] Conditional import in pure Python mode

2012-05-02 Thread Stefan Behnel
Robert Bradshaw, 02.05.2012 08:56: > On Tue, May 1, 2012 at 1:02 PM, Stefan Behnel wrote: >> Francesc Alted, 01.05.2012 21:49: >>> On 5/1/12 2:39 PM, mark florisson wrote: On 1 May 2012 20:22, Stefan Behnel wrote: > Stefan Behnel, 01.05.2012 21:14: >> 2) Use math.pxd as an override for

Re: [Cython] [cython-users] cimport numpy fails with Python 3 semantics

2012-05-02 Thread Robert Bradshaw
On Sun, Apr 29, 2012 at 11:48 PM, Stefan Behnel wrote: > mark florisson, 28.04.2012 21:57: >> On 28 April 2012 19:50, Stefan Behnel wrote: >>> mark florisson, 28.04.2012 20:33: I think each module should have its own language level, so I think that's a bug. I think the rules should be: >