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] 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] Conditional import in pure Python mode

2012-05-01 Thread Robert Bradshaw
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 the math module. I'm not sure yet how >>

Re: [Cython] Conditional import in pure Python mode

2012-05-01 Thread Stefan Behnel
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 the math module. I'm not sure yet how that would best be made to work, but it shouldn't be all

Re: [Cython] Conditional import in pure Python mode

2012-05-01 Thread Stefan Behnel
mark florisson, 01.05.2012 21:39: > On 1 May 2012 20:22, Stefan Behnel wrote: >> Stefan Behnel, 01.05.2012 21:14: >>> 2) Use math.pxd as an override for the math module. I'm not sure yet how >>> that would best be made to work, but it shouldn't be all that complex. It >>> already works (mostly?) fo

Re: [Cython] Conditional import in pure Python mode

2012-05-01 Thread Francesc Alted
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 the math module. I'm not sure yet how that would best be made to work, but it shouldn't be all that complex. It already works (mostly?) for num

Re: [Cython] Conditional import in pure Python mode

2012-05-01 Thread mark florisson
On 1 May 2012 20:22, Stefan Behnel wrote: > Stefan Behnel, 01.05.2012 21:14: >> 2) Use math.pxd as an override for the math module. I'm not sure yet how >> that would best be made to work, but it shouldn't be all that complex. It >> already works (mostly?) for numpy.pxd, for example, although that

Re: [Cython] Conditional import in pure Python mode

2012-05-01 Thread Stefan Behnel
Stefan Behnel, 01.05.2012 21:14: > 2) Use math.pxd as an override for the math module. I'm not sure yet how > that would best be made to work, but it shouldn't be all that complex. It > already works (mostly?) for numpy.pxd, for example, although that's done > explicitly in user code. BTW, I think