[Cython] Fwd: Re: [cython-users] checking for "None" in nogil function

2012-05-07 Thread Dag Sverre Seljebotn
[moving to dev list] On 05/07/2012 11:17 AM, Stefan Behnel wrote: Dag Sverre Seljebotn, 07.05.2012 10:44: On 05/07/2012 07:48 AM, Stefan Behnel wrote: shaunc, 07.05.2012 07:13: The following code: cdef int foo( double[:] bar ) nogil: return bar is None causes: "Converting to Python ob

Re: [Cython] Fwd: Re: [cython-users] checking for "None" in nogil function

2012-05-07 Thread Stefan Behnel
Dag Sverre Seljebotn, 07.05.2012 12:40: > moving to dev list Makes sense. > On 05/07/2012 11:17 AM, Stefan Behnel wrote: >> Dag Sverre Seljebotn, 07.05.2012 10:44: >>> On 05/07/2012 07:48 AM, Stefan Behnel wrote: I wonder why a memory view should be allowed to be None in the first place

Re: [Cython] Fwd: Re: [cython-users] checking for "None" in nogil function

2012-05-07 Thread Dag Sverre Seljebotn
On 05/07/2012 01:10 PM, Stefan Behnel wrote: Dag Sverre Seljebotn, 07.05.2012 12:40: moving to dev list Makes sense. On 05/07/2012 11:17 AM, Stefan Behnel wrote: Dag Sverre Seljebotn, 07.05.2012 10:44: On 05/07/2012 07:48 AM, Stefan Behnel wrote: I wonder why a memory view should be allow

Re: [Cython] Fwd: Re: [cython-users] checking for "None" in nogil function

2012-05-07 Thread Dag Sverre Seljebotn
On 05/07/2012 01:48 PM, Dag Sverre Seljebotn wrote: On 05/07/2012 01:10 PM, Stefan Behnel wrote: Dag Sverre Seljebotn, 07.05.2012 12:40: moving to dev list Makes sense. On 05/07/2012 11:17 AM, Stefan Behnel wrote: Dag Sverre Seljebotn, 07.05.2012 10:44: On 05/07/2012 07:48 AM, Stefan Behn

Re: [Cython] Fwd: Re: [cython-users] checking for "None" in nogil function

2012-05-07 Thread Stefan Behnel
Dag Sverre Seljebotn, 07.05.2012 13:48: > On 05/07/2012 01:10 PM, Stefan Behnel wrote: >> Dag Sverre Seljebotn, 07.05.2012 12:40: >>> On 05/07/2012 11:17 AM, Stefan Behnel wrote: Dag Sverre Seljebotn, 07.05.2012 10:44: > On 05/07/2012 07:48 AM, Stefan Behnel wrote: >> I wonder why a me

[Cython] buffer syntax vs. memory view syntax (was: Re: checking for "None" in nogil function)

2012-05-07 Thread Stefan Behnel
Stefan Behnel, 07.05.2012 15:04: > Dag Sverre Seljebotn, 07.05.2012 13:48: >> BTW, with the coming of memoryviews, me and Mark talked about just >> deprecating the "mytype[...]" meaning buffers, and rather treat it as >> np.ndarray, array.array etc. being some sort of "template types". That is, >>

[Cython] How do you trigger a jenkins build?

2012-05-07 Thread Vitja Makarov
I've noticed that old one URL hook doesn't work for me now. I tried to check "Build when a change is pushed to GitHub" and set "Jenkins Hook URL" to https://sage.math.washington.edu:8091/hudson/github-webhook/ That doesn't work. What is the right way? -- vitja. _

Re: [Cython] Fwd: Re: [cython-users] checking for "None" in nogil function

2012-05-07 Thread Dag Sverre Seljebotn
On 05/07/2012 03:04 PM, Stefan Behnel wrote: Dag Sverre Seljebotn, 07.05.2012 13:48: Here you go: def foo(np.ndarray[double] a, np.ndarray[double] out=None): if out is None: out = np.empty_like(a) Ah, right - output arguments. Hadn't thought of those. Still, since you pass None

Re: [Cython] buffer syntax vs. memory view syntax

2012-05-07 Thread Dag Sverre Seljebotn
On 05/07/2012 04:16 PM, Stefan Behnel wrote: Stefan Behnel, 07.05.2012 15:04: Dag Sverre Seljebotn, 07.05.2012 13:48: BTW, with the coming of memoryviews, me and Mark talked about just deprecating the "mytype[...]" meaning buffers, and rather treat it as np.ndarray, array.array etc. being some

Re: [Cython] buffer syntax vs. memory view syntax

2012-05-07 Thread Dag Sverre Seljebotn
On 05/07/2012 06:00 PM, Dag Sverre Seljebotn wrote: On 05/07/2012 04:16 PM, Stefan Behnel wrote: Stefan Behnel, 07.05.2012 15:04: Dag Sverre Seljebotn, 07.05.2012 13:48: BTW, with the coming of memoryviews, me and Mark talked about just deprecating the "mytype[...]" meaning buffers, and rather

Re: [Cython] Fwd: Re: [cython-users] checking for "None" in nogil function

2012-05-07 Thread mark florisson
On 7 May 2012 12:51, Dag Sverre Seljebotn wrote: > On 05/07/2012 01:48 PM, Dag Sverre Seljebotn wrote: >> >> On 05/07/2012 01:10 PM, Stefan Behnel wrote: >>> >>> Dag Sverre Seljebotn, 07.05.2012 12:40: moving to dev list >>> >>> >>> Makes sense. >>> On 05/07/2012 11:17 AM, Stefan Be

Re: [Cython] Fwd: Re: [cython-users] checking for "None" in nogil function

2012-05-07 Thread mark florisson
On 7 May 2012 12:10, Stefan Behnel wrote: > Dag Sverre Seljebotn, 07.05.2012 12:40: >> moving to dev list > > Makes sense. > >> On 05/07/2012 11:17 AM, Stefan Behnel wrote: >>> Dag Sverre Seljebotn, 07.05.2012 10:44: On 05/07/2012 07:48 AM, Stefan Behnel wrote: > I wonder why a memory vie

Re: [Cython] 0.17

2012-05-07 Thread Vitja Makarov
2012/5/7 mark florisson : > On 6 May 2012 20:41, Matthew Brett wrote: >> Hi, >> >> On Sun, May 6, 2012 at 7:28 AM, mark florisson >> wrote: >>> Hey, >>> >>> I think we already have quite a bit of functionality (nearly) ready, >>> after merging some pending pull requests maybe it will be a good ti

Re: [Cython] Fwd: Re: [cython-users] checking for "None" in nogil function

2012-05-07 Thread Dag Sverre Seljebotn
On 05/07/2012 06:04 PM, mark florisson wrote: On 7 May 2012 12:10, Stefan Behnel wrote: Dag Sverre Seljebotn, 07.05.2012 12:40: moving to dev list Makes sense. On 05/07/2012 11:17 AM, Stefan Behnel wrote: Dag Sverre Seljebotn, 07.05.2012 10:44: On 05/07/2012 07:48 AM, Stefan Behnel wrote

Re: [Cython] Fwd: Re: [cython-users] checking for "None" in nogil function

2012-05-07 Thread Stefan Behnel
Dag Sverre Seljebotn, 07.05.2012 18:07: > On 05/07/2012 06:04 PM, mark florisson wrote: >> On 7 May 2012 12:10, Stefan Behnel wrote: >>> BTW, is there a reason why we shouldn't allow a "not None" declaration for >>> cdef functions? Obviously, the caller would have to do the check in that >>> case.

Re: [Cython] Fwd: Re: [cython-users] checking for "None" in nogil function

2012-05-07 Thread mark florisson
On 7 May 2012 16:48, Dag Sverre Seljebotn wrote: > On 05/07/2012 03:04 PM, Stefan Behnel wrote: >> >> Dag Sverre Seljebotn, 07.05.2012 13:48: >> >>> Here you go: >>> >>> def foo(np.ndarray[double] a, np.ndarray[double] out=None): >>>     if out is None: >>>         out = np.empty_like(a) >> >> >>

Re: [Cython] Fwd: Re: [cython-users] checking for "None" in nogil function

2012-05-07 Thread mark florisson
On 7 May 2012 17:12, Stefan Behnel wrote: > Dag Sverre Seljebotn, 07.05.2012 18:07: >> On 05/07/2012 06:04 PM, mark florisson wrote: >>> On 7 May 2012 12:10, Stefan Behnel wrote: BTW, is there a reason why we shouldn't allow a "not None" declaration for cdef functions? Obviously, the cal

Re: [Cython] Fwd: Re: [cython-users] checking for "None" in nogil function

2012-05-07 Thread mark florisson
On 7 May 2012 17:16, mark florisson wrote: > On 7 May 2012 17:12, Stefan Behnel wrote: >> Dag Sverre Seljebotn, 07.05.2012 18:07: >>> On 05/07/2012 06:04 PM, mark florisson wrote: On 7 May 2012 12:10, Stefan Behnel wrote: > BTW, is there a reason why we shouldn't allow a "not None" decla

Re: [Cython] 0.17

2012-05-07 Thread mark florisson
On 7 May 2012 17:04, Vitja Makarov wrote: > 2012/5/7 mark florisson : >> On 6 May 2012 20:41, Matthew Brett wrote: >>> Hi, >>> >>> On Sun, May 6, 2012 at 7:28 AM, mark florisson >>> wrote: Hey, I think we already have quite a bit of functionality (nearly) ready, after merging

Re: [Cython] Fwd: Re: [cython-users] checking for "None" in nogil function

2012-05-07 Thread Dag Sverre Seljebotn
On 05/07/2012 06:18 PM, mark florisson wrote: On 7 May 2012 17:16, mark florisson wrote: On 7 May 2012 17:12, Stefan Behnel wrote: Dag Sverre Seljebotn, 07.05.2012 18:07: On 05/07/2012 06:04 PM, mark florisson wrote: On 7 May 2012 12:10, Stefan Behnel wrote: BTW, is there a reason why we s

Re: [Cython] buffer syntax vs. memory view syntax

2012-05-07 Thread mark florisson
On 7 May 2012 17:00, Dag Sverre Seljebotn wrote: > On 05/07/2012 04:16 PM, Stefan Behnel wrote: >> >> Stefan Behnel, 07.05.2012 15:04: >>> >>> Dag Sverre Seljebotn, 07.05.2012 13:48: BTW, with the coming of memoryviews, me and Mark talked about just deprecating the "mytype[...]" mea

Re: [Cython] checking for "None" in nogil function

2012-05-07 Thread Stefan Behnel
Dag Sverre Seljebotn, 07.05.2012 17:48: > On 05/07/2012 03:04 PM, Stefan Behnel wrote: >> Dag Sverre Seljebotn, 07.05.2012 13:48: > As far as I can remember (which might be biased towards my personal > view), the conclusion was that we left the current semantics in place, > relying on b

Re: [Cython] buffer syntax vs. memory view syntax

2012-05-07 Thread Stefan Behnel
mark florisson, 07.05.2012 18:28: > On 7 May 2012 17:00, Dag Sverre Seljebotn wrote: >> On 05/07/2012 04:16 PM, Stefan Behnel wrote: >>> Stefan Behnel, 07.05.2012 15:04: Dag Sverre Seljebotn, 07.05.2012 13:48: > BTW, with the coming of memoryviews, me and Mark talked about just > depre

Re: [Cython] Fwd: Re: [cython-users] checking for "None" in nogil function

2012-05-07 Thread Stefan Behnel
mark florisson, 07.05.2012 18:18: > On 7 May 2012 17:16, mark florisson wrote: >> On 7 May 2012 17:12, Stefan Behnel wrote: >>> Dag Sverre Seljebotn, 07.05.2012 18:07: On 05/07/2012 06:04 PM, mark florisson wrote: > On 7 May 2012 12:10, Stefan Behnel wrote: >> BTW, is there a reason wh

Re: [Cython] 0.17

2012-05-07 Thread Stefan Behnel
mark florisson, 07.05.2012 18:19: > On 7 May 2012 17:04, Vitja Makarov wrote: >> Hmm, it seems to me that master is currently broken: >> >> https://sage.math.washington.edu:8091/hudson/job/cython-devel-tests/BACKEND=c,PYVERSION=py27-ext/ >> > Quite broken, in fact :) It doesn't ever print error mes

Re: [Cython] buffer syntax vs. memory view syntax

2012-05-07 Thread mark florisson
On 7 May 2012 18:00, Stefan Behnel wrote: > mark florisson, 07.05.2012 18:28: >> On 7 May 2012 17:00, Dag Sverre Seljebotn wrote: >>> On 05/07/2012 04:16 PM, Stefan Behnel wrote: Stefan Behnel, 07.05.2012 15:04: > Dag Sverre Seljebotn, 07.05.2012 13:48: >> BTW, with the coming of memo

Re: [Cython] buffer syntax vs. memory view syntax

2012-05-07 Thread Dag Sverre Seljebotn
On 05/07/2012 07:00 PM, Stefan Behnel wrote: mark florisson, 07.05.2012 18:28: On 7 May 2012 17:00, Dag Sverre Seljebotn wrote: On 05/07/2012 04:16 PM, Stefan Behnel wrote: Stefan Behnel, 07.05.2012 15:04: Dag Sverre Seljebotn, 07.05.2012 13:48: BTW, with the coming of memoryviews, me and Ma

Re: [Cython] Fwd: Re: [cython-users] checking for "None" in nogil function

2012-05-07 Thread mark florisson
On 7 May 2012 18:06, Stefan Behnel wrote: > mark florisson, 07.05.2012 18:18: >> On 7 May 2012 17:16, mark florisson wrote: >>> On 7 May 2012 17:12, Stefan Behnel wrote: Dag Sverre Seljebotn, 07.05.2012 18:07: > On 05/07/2012 06:04 PM, mark florisson wrote: >> On 7 May 2012 12:10, Ste

Re: [Cython] checking for "None" in nogil function

2012-05-07 Thread mark florisson
On 7 May 2012 17:52, Stefan Behnel wrote: > Dag Sverre Seljebotn, 07.05.2012 17:48: >> On 05/07/2012 03:04 PM, Stefan Behnel wrote: >>> Dag Sverre Seljebotn, 07.05.2012 13:48: >> As far as I can remember (which might be biased towards my personal >> view), the conclusion was that we left t

Re: [Cython] checking for "None" in nogil function

2012-05-07 Thread mark florisson
On 7 May 2012 18:18, mark florisson wrote: > On 7 May 2012 17:52, Stefan Behnel wrote: >> Dag Sverre Seljebotn, 07.05.2012 17:48: >>> On 05/07/2012 03:04 PM, Stefan Behnel wrote: Dag Sverre Seljebotn, 07.05.2012 13:48: >>> As far as I can remember (which might be biased towards my person

Re: [Cython] buffer syntax vs. memory view syntax

2012-05-07 Thread Dag Sverre Seljebotn
mark florisson wrote: >On 7 May 2012 17:00, Dag Sverre Seljebotn >wrote: >> On 05/07/2012 04:16 PM, Stefan Behnel wrote: >>> >>> Stefan Behnel, 07.05.2012 15:04: Dag Sverre Seljebotn, 07.05.2012 13:48: > > BTW, with the coming of memoryviews, me and Mark talked about just >>>

Re: [Cython] buffer syntax vs. memory view syntax

2012-05-07 Thread mark florisson
On 7 May 2012 19:40, Dag Sverre Seljebotn wrote: > > > mark florisson wrote: > >>On 7 May 2012 17:00, Dag Sverre Seljebotn >>wrote: >>> On 05/07/2012 04:16 PM, Stefan Behnel wrote: Stefan Behnel, 07.05.2012 15:04: > > Dag Sverre Seljebotn, 07.05.2012 13:48: >> >> BTW, w

Re: [Cython] buffer syntax vs. memory view syntax

2012-05-07 Thread Robert Bradshaw
On Mon, May 7, 2012 at 11:40 AM, Dag Sverre Seljebotn wrote: > > mark florisson wrote: > >>On 7 May 2012 17:00, Dag Sverre Seljebotn >>wrote: >>> On 05/07/2012 04:16 PM, Stefan Behnel wrote: Stefan Behnel, 07.05.2012 15:04: > > Dag Sverre Seljebotn, 07.05.2012 13:48: >> >>>

Re: [Cython] 0.17

2012-05-07 Thread Robert Bradshaw
On Mon, May 7, 2012 at 10:08 AM, Stefan Behnel wrote: > mark florisson, 07.05.2012 18:19: >> On 7 May 2012 17:04, Vitja Makarov wrote: >>> Hmm, it seems to me that master is currently broken: >>> >>> https://sage.math.washington.edu:8091/hudson/job/cython-devel-tests/BACKEND=c,PYVERSION=py27-ext/

Re: [Cython] Fwd: Re: [cython-users] checking for "None" in nogil function

2012-05-07 Thread Robert Bradshaw
On Mon, May 7, 2012 at 3:40 AM, Dag Sverre Seljebotn wrote: > [moving to dev list] > > > On 05/07/2012 11:17 AM, Stefan Behnel wrote: >> >> Dag Sverre Seljebotn, 07.05.2012 10:44: >>> >>> On 05/07/2012 07:48 AM, Stefan Behnel wrote: shaunc, 07.05.2012 07:13: > > The following cod

Re: [Cython] Fwd: Re: [cython-users] checking for "None" in nogil function

2012-05-07 Thread Robert Bradshaw
On Mon, May 7, 2012 at 8:48 AM, Dag Sverre Seljebotn wrote: > On 05/07/2012 03:04 PM, Stefan Behnel wrote: >> >> Dag Sverre Seljebotn, 07.05.2012 13:48: >> >>> Here you go: >>> >>> def foo(np.ndarray[double] a, np.ndarray[double] out=None): >>>     if out is None: >>>         out = np.empty_like(a

Re: [Cython] Fwd: Re: [cython-users] checking for "None" in nogil function

2012-05-07 Thread Greg Ewing
Stefan Behnel wrote: The main reason we didn't change this behaviour back then was that it would clearly break user code and we thought we could do without that. That's different from considering it "right" and "good". I changed the None-checking behaviour in Pyrex because I *wanted* to break

Re: [Cython] Fwd: Re: [cython-users] checking for "None" in nogil function

2012-05-07 Thread Robert Bradshaw
On Mon, May 7, 2012 at 5:05 PM, Greg Ewing wrote: > Stefan Behnel wrote: > >> The main reason we didn't change this behaviour back then was that it >> would >> clearly break user code and we thought we could do without that. That's >> different from considering it "right" and "good". > > I changed

Re: [Cython] Fwd: Re: [cython-users] checking for "None" in nogil function

2012-05-07 Thread Stefan Behnel
Greg Ewing, 08.05.2012 02:05: > Stefan Behnel wrote: > >> The main reason we didn't change this behaviour back then was that it would >> clearly break user code and we thought we could do without that. That's >> different from considering it "right" and "good". > > I changed the None-checking beh

Re: [Cython] How do you trigger a jenkins build?

2012-05-07 Thread Stefan Behnel
Vitja Makarov, 07.05.2012 17:08: > I've noticed that old one URL hook doesn't work for me now. > > I tried to check "Build when a change is pushed to GitHub" That should work. > and set "Jenkins Hook URL" to > https://sage.math.washington.edu:8091/hudson/github-webhook/ That isn't configured

Re: [Cython] Fwd: Re: [cython-users] checking for "None" in nogil function

2012-05-07 Thread Stefan Behnel
mark florisson, 07.05.2012 19:13: > On 7 May 2012 18:06, Stefan Behnel wrote: >> mark florisson, 07.05.2012 18:18: >>> On 7 May 2012 17:16, mark florisson wrote: On 7 May 2012 17:12, Stefan Behnel wrote: > Dag Sverre Seljebotn, 07.05.2012 18:07: >> On 05/07/2012 06:04 PM, mark floriss

Re: [Cython] buffer syntax vs. memory view syntax

2012-05-07 Thread Stefan Behnel
Dag Sverre Seljebotn, 07.05.2012 19:10: > On 05/07/2012 07:00 PM, Stefan Behnel wrote: >> mark florisson, 07.05.2012 18:28: >>> On 7 May 2012 17:00, Dag Sverre Seljebotn wrote: On 05/07/2012 04:16 PM, Stefan Behnel wrote: > Stefan Behnel, 07.05.2012 15:04: >> Dag Sverre Seljebotn, 07.0

[Cython] Bug report: enumerate does not accept the "start" argument

2012-05-07 Thread Russell Warren
Python's built-in function 'enumerate' has a lesser-known 2nd argument that allows the start value of the enumeration to be set. See the python docs here: http://docs.python.org/library/functions.html#enumerate Cython 0.16 doesn't like it, and only allows one argument. Here is a simple file to r

Re: [Cython] Fwd: Re: [cython-users] checking for "None" in nogil function

2012-05-07 Thread Robert Bradshaw
On Mon, May 7, 2012 at 9:41 PM, Stefan Behnel wrote: > Greg Ewing, 08.05.2012 02:05: >> Stefan Behnel wrote: >> >>> The main reason we didn't change this behaviour back then was that it would >>> clearly break user code and we thought we could do without that. That's >>> different from considering

Re: [Cython] How do you trigger a jenkins build?

2012-05-07 Thread Vitja Makarov
2012/5/8 Stefan Behnel : > Vitja Makarov, 07.05.2012 17:08: >> I've noticed that old one URL hook doesn't work for me now. >> >> I tried to check "Build when a change is pushed to GitHub" > > That should work. > > >> and set "Jenkins Hook URL"  to >> https://sage.math.washington.edu:8091/hudson/git