Re: [Cython] 0.16.1

2012-05-08 Thread Stefan Behnel
Robert Bradshaw, 09.05.2012 00:16: > On Tue, May 8, 2012 at 12:04 PM, Vitja Makarov wrote: >> 2012/5/8 mark florisson: >>> On 8 May 2012 19:36, mark florisson wrote: Ok, so for the bugfix release 0.16.1 I propose that everyone cherry picks over its own fixes into the release branch (at le

Re: [Cython] CF based type inference

2012-05-08 Thread Stefan Behnel
Robert Bradshaw, 09.05.2012 00:12: > On Tue, May 8, 2012 at 6:47 AM, Vitja Makarov wrote: >> 2012/5/8 Stefan Behnel: >>> Vitja has rebased the type inference on the control flow, so I wonder if >>> this will enable us to properly infer this: >>> >>> def partial_validity(): >>>""" >>>>>> pa

Re: [Cython] 0.16.1

2012-05-08 Thread Robert Bradshaw
On Tue, May 8, 2012 at 12:04 PM, Vitja Makarov wrote: > 2012/5/8 mark florisson : >> On 8 May 2012 19:36, mark florisson wrote: >>> Ok, so for the bugfix release 0.16.1 I propose that everyone cherry >>> picks over its own fixes into the release branch (at least Stefan, >>> since your fixes perta

Re: [Cython] CF based type inference

2012-05-08 Thread Robert Bradshaw
On Tue, May 8, 2012 at 6:47 AM, Vitja Makarov wrote: > 2012/5/8 Stefan Behnel : >> Hi, >> >> Vitja has rebased the type inference on the control flow, so I wonder if >> this will enable us to properly infer this: >> >>  def partial_validity(): >>    """ >>    >>> partial_validity() >>    ('Python

Re: [Cython] 0.16.1

2012-05-08 Thread Vitja Makarov
2012/5/8 mark florisson : > On 8 May 2012 19:36, mark florisson wrote: >> Ok, so for the bugfix release 0.16.1 I propose that everyone cherry >> picks over its own fixes into the release branch (at least Stefan, >> since your fixes pertain to your newly merged branches and sometimes >> to the mast

Re: [Cython] 0.16.1

2012-05-08 Thread mark florisson
On 8 May 2012 19:36, mark florisson wrote: > Ok, so for the bugfix release 0.16.1 I propose that everyone cherry > picks over its own fixes into the release branch (at least Stefan, > since your fixes pertain to your newly merged branches and sometimes > to the master branch itself). This branch s

[Cython] 0.16.1

2012-05-08 Thread mark florisson
Ok, so for the bugfix release 0.16.1 I propose that everyone cherry picks over its own fixes into the release branch (at least Stefan, since your fixes pertain to your newly merged branches and sometimes to the master branch itself). This branch should not be merged back into master, and any additi

Re: [Cython] CF based type inference

2012-05-08 Thread Dag Sverre Seljebotn
Vitja Makarov wrote: >2012/5/8 Stefan Behnel : >> Hi, >> >> Vitja has rebased the type inference on the control flow, so I wonder >if >> this will enable us to properly infer this: >> >>  def partial_validity(): >>    """ >>    >>> partial_validity() >>    ('Python object', 'double', 'str objec

Re: [Cython] CF based type inference

2012-05-08 Thread Vitja Makarov
2012/5/8 Stefan Behnel : > Hi, > > Vitja has rebased the type inference on the control flow, so I wonder if > this will enable us to properly infer this: > >  def partial_validity(): >    """ >    >>> partial_validity() >    ('Python object', 'double', 'str object') >    """ >    a = 1.0 >    b = a

Re: [Cython] [cython-users] Confusing beheavior of memoryview (assigning value to slice fails without any indication)

2012-05-08 Thread Stefan Behnel
mark florisson, 08.05.2012 11:11: > On 7 May 2012 13:09, Maxim wrote: >> Consider the following code: >> >>> # a.pyx: >>> cdef class Base(object): >>> cdef public double[:,:] arr >>> # b.py: >>> from a import Base >>> import numpy as np >>> class MyClass(Base): >>> def __init__(self): >>> s

[Cython] CF based type inference

2012-05-08 Thread Stefan Behnel
Hi, Vitja has rebased the type inference on the control flow, so I wonder if this will enable us to properly infer this: def partial_validity(): """ >>> partial_validity() ('Python object', 'double', 'str object') """ a = 1.0 b = a + 2 # definitely double a = 'test

[Cython] callable() optimization

2012-05-08 Thread Vitja Makarov
I've noticed regression related to callable() optimization. https://github.com/cython/cython/commit/a40112b0461eae5ab22fbdd07ae798d4a72ff523 class C: pass print callable(C()) It prints True optimized version checks ((obj)->ob_type->tp_call != NULL) condition that is True for both class and i

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

2012-05-08 Thread mark florisson
On 8 May 2012 10:48, Stefan Behnel wrote: > mark florisson, 08.05.2012 11:24: > Dag Sverre Seljebotn, 08.05.2012 09:57: >>  1) We NEVER deprecate "np.ndarray[double]", we commit to keeping that in >> the language. It means exactly what you would like double[:] to mean, >> i.e.

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

2012-05-08 Thread mark florisson
On 8 May 2012 10:47, Dag Sverre Seljebotn wrote: > On 05/08/2012 11:30 AM, Dag Sverre Seljebotn wrote: >> >> On 05/08/2012 11:22 AM, mark florisson wrote: >>> >>> On 8 May 2012 09:36, Dag Sverre Seljebotn >>> wrote: On 05/08/2012 10:18 AM, Stefan Behnel wrote: > > > Dag Sverr

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

2012-05-08 Thread Stefan Behnel
mark florisson, 08.05.2012 11:24: Dag Sverre Seljebotn, 08.05.2012 09:57: > 1) We NEVER deprecate "np.ndarray[double]", we commit to keeping that in > the language. It means exactly what you would like double[:] to mean, > i.e. > a variable that is memoryview when you need to

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

2012-05-08 Thread Dag Sverre Seljebotn
On 05/08/2012 11:30 AM, Dag Sverre Seljebotn wrote: On 05/08/2012 11:22 AM, mark florisson wrote: On 8 May 2012 09:36, Dag Sverre Seljebotn wrote: On 05/08/2012 10:18 AM, Stefan Behnel wrote: Dag Sverre Seljebotn, 08.05.2012 09:57: On 05/07/2012 11:21 PM, mark florisson wrote: On 7 May 20

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

2012-05-08 Thread Dag Sverre Seljebotn
On 05/08/2012 11:22 AM, mark florisson wrote: On 8 May 2012 09:36, Dag Sverre Seljebotn wrote: On 05/08/2012 10:18 AM, Stefan Behnel wrote: Dag Sverre Seljebotn, 08.05.2012 09:57: On 05/07/2012 11:21 PM, mark florisson wrote: On 7 May 2012 19:40, Dag Sverre Seljebotn wrote: mark floriss

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

2012-05-08 Thread mark florisson
On 8 May 2012 09:49, Stefan Behnel wrote: > Dag Sverre Seljebotn, 08.05.2012 10:36: >> On 05/08/2012 10:18 AM, Stefan Behnel wrote: >>> Dag Sverre Seljebotn, 08.05.2012 09:57: On 05/07/2012 11:21 PM, mark florisson wrote: > On 7 May 2012 19:40, Dag Sverre Seljebotn wrote: >> mark flor

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

2012-05-08 Thread mark florisson
On 8 May 2012 10:22, mark florisson wrote: > On 8 May 2012 09:36, Dag Sverre Seljebotn wrote: >> On 05/08/2012 10:18 AM, Stefan Behnel wrote: >>> >>> Dag Sverre Seljebotn, 08.05.2012 09:57: On 05/07/2012 11:21 PM, mark florisson wrote: > > On 7 May 2012 19:40, Dag Sverre Seljebo

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

2012-05-08 Thread mark florisson
On 8 May 2012 09:36, Dag Sverre Seljebotn wrote: > On 05/08/2012 10:18 AM, Stefan Behnel wrote: >> >> Dag Sverre Seljebotn, 08.05.2012 09:57: >>> >>> On 05/07/2012 11:21 PM, mark florisson wrote: On 7 May 2012 19:40, Dag Sverre Seljebotn wrote: > > mark florisson wrote: >> >>

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

2012-05-08 Thread mark florisson
On 8 May 2012 09:49, Stefan Behnel wrote: > Dag Sverre Seljebotn, 08.05.2012 10:36: >> On 05/08/2012 10:18 AM, Stefan Behnel wrote: >>> Dag Sverre Seljebotn, 08.05.2012 09:57: On 05/07/2012 11:21 PM, mark florisson wrote: > On 7 May 2012 19:40, Dag Sverre Seljebotn wrote: >> mark flor

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

2012-05-08 Thread Stefan Behnel
Dag Sverre Seljebotn, 08.05.2012 10:36: > On 05/08/2012 10:18 AM, Stefan Behnel wrote: >> Dag Sverre Seljebotn, 08.05.2012 09:57: >>> On 05/07/2012 11:21 PM, mark florisson wrote: On 7 May 2012 19:40, Dag Sverre Seljebotn wrote: > mark florisson wrote: >> On 7 May 2012 17:00, Dag Sverr

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

2012-05-08 Thread Dag Sverre Seljebotn
On 05/08/2012 10:18 AM, Stefan Behnel wrote: Dag Sverre Seljebotn, 08.05.2012 09:57: On 05/07/2012 11:21 PM, mark florisson wrote: 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 wro

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

2012-05-08 Thread Dag Sverre Seljebotn
On 05/08/2012 10:18 AM, Stefan Behnel wrote: Dag Sverre Seljebotn, 08.05.2012 09:57: On 05/07/2012 11:21 PM, mark florisson wrote: 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 wro

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

2012-05-08 Thread Stefan Behnel
Dag Sverre Seljebotn, 08.05.2012 09:57: > On 05/07/2012 11:21 PM, mark florisson wrote: >> 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.

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

2012-05-08 Thread Dag Sverre Seljebotn
On 05/07/2012 11:21 PM, mark florisson wrote: 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:

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

2012-05-08 Thread Stefan Behnel
Russell Warren, 08.05.2012 08:25: > 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 al