Re: [Cython] [PATCH] make memoryviews work when strides is NULL (unfinished)

2012-09-19 Thread mark florisson
On 19 September 2012 08:03, Christoph Groth wrote: > Hi Mark, > >> Thanks for the patch, it looks fine to me. If you want, you could make >> a pull request and I'll merge it. > > Ok, the pull request is here: > https://github.com/cython/cython/pull/150 > > Please double-check that the dereferencin

Re: [Cython] cpdef, nogil and void return (was: [cython-users] Use the function abs in a cpdef function with nogil)

2012-09-22 Thread mark florisson
On 22 September 2012 14:03, Stefan Behnel wrote: > [CC-ing cython-devel here as this is a design issue] > > Joaquin Cuenca Abela, 21.09.2012 19:32: >> On Fri, Sep 21, 2012 at 6:12 PM, Chris Barker wrote: >>> On Fri, Sep 21, 2012 at 2:48 AM, Joaquin Cuenca Abela wrote: I don't set a return typ

Re: [Cython] ref-leak in 0.17

2012-09-25 Thread mark florisson
On 25 September 2012 16:12, Stefan Behnel wrote: > Stefan Behnel, 25.09.2012 14:55: >> there is a reference leak in the new dict iteration code in 0.17: >> >> http://trac.cython.org/cython_trac/ticket/790 >> >> I'll see if I can fix it and then release a pure bugfix 0.17.1 right >> afterwards. >>

Re: [Cython] ref-leak in 0.17

2012-09-25 Thread mark florisson
On 25 September 2012 16:48, Stefan Behnel wrote: > mark florisson, 25.09.2012 17:27: >> On 25 September 2012 16:12, Stefan Behnel wrote: >>> Stefan Behnel, 25.09.2012 14:55: >>>> there is a reference leak in the new dict iteration code in 0.17: >>>> >

Re: [Cython] array expressions

2012-10-12 Thread mark florisson
On 12 October 2012 08:36, Stefan Behnel wrote: > mark florisson, 24.08.2012 20:40: >> Here a pull request for element-wise array expressions for Cython: >> https://github.com/cython/cython/pull/144 > > Mark, any news on this? I'd like to see a version merged before

Re: [Cython] array expressions

2012-10-13 Thread mark florisson
On 12 October 2012 20:01, Dag Sverre Seljebotn wrote: > On 10/12/2012 05:50 PM, Robert Bradshaw wrote: >> >> On Fri, Oct 12, 2012 at 3:14 AM, mark florisson >> wrote: >>> >>> On 12 October 2012 08:36, Stefan Behnel wrote: >>>> >>>

Re: [Cython] array expressions

2012-10-14 Thread mark florisson
On 14 October 2012 09:23, Dag Sverre Seljebotn wrote: > On 10/14/2012 10:18 AM, Dag Sverre Seljebotn wrote: >> >> On 10/14/2012 08:18 AM, Stefan Behnel wrote: >>> >>> mark florisson, 13.10.2012 20:30: >>>> >>>> On 12 October 2012 20:01, Da

Re: [Cython] array expressions

2012-10-14 Thread mark florisson
On 14 October 2012 09:32, Stefan Behnel wrote: > Dag Sverre Seljebotn, 14.10.2012 10:18: >> On 10/14/2012 08:18 AM, Stefan Behnel wrote: >>> mark florisson, 13.10.2012 20:30: >>>> On 12 October 2012 20:01, Dag Sverre Seljebotn wrote: >>>>> On 10/12/20

Re: [Cython] array expressions

2012-10-14 Thread mark florisson
On 14 October 2012 11:23, Stefan Behnel wrote: > Dag Sverre Seljebotn, 14.10.2012 11:03: >> On 10/14/2012 10:32 AM, Stefan Behnel wrote: >>> Dag Sverre Seljebotn, 14.10.2012 10:18: >>>> On 10/14/2012 08:18 AM, Stefan Behnel wrote: >>>>> mark florisson

Re: [Cython] array expressions

2012-10-14 Thread mark florisson
On 14 October 2012 14:05, Stefan Behnel wrote: > mark florisson, 14.10.2012 13:59: >> The problem with minivect as a package is that it caters to different >> projects, which have different requirements. Cython and minivect are >> quite closely coupled, and any future change,

Re: [Cython] array expressions

2012-10-21 Thread mark florisson
On 16 October 2012 18:48, Robert Bradshaw wrote: > On Sun, Oct 14, 2012 at 6:13 AM, mark florisson > wrote: >> On 14 October 2012 14:05, Stefan Behnel wrote: >>> mark florisson, 14.10.2012 13:59: >>>> The problem with minivect as a package is that it caters

Re: [Cython] array expressions

2012-10-21 Thread mark florisson
On 21 October 2012 13:39, mark florisson wrote: > On 16 October 2012 18:48, Robert Bradshaw wrote: >> On Sun, Oct 14, 2012 at 6:13 AM, mark florisson >> wrote: >>> On 14 October 2012 14:05, Stefan Behnel wrote: >>>> mark florisson, 14.10.2012 13:59: >>

Re: [Cython] array expressions

2012-10-23 Thread mark florisson
On 23 October 2012 02:44, Robert Bradshaw wrote: > On Sun, Oct 21, 2012 at 5:39 AM, mark florisson > wrote: >> On 16 October 2012 18:48, Robert Bradshaw wrote: >>> On Sun, Oct 14, 2012 at 6:13 AM, mark florisson >>> wrote: >>>> On 14 October 20

Re: [Cython] array expressions

2012-10-28 Thread mark florisson
On 23 October 2012 10:47, mark florisson wrote: > On 23 October 2012 02:44, Robert Bradshaw wrote: >> On Sun, Oct 21, 2012 at 5:39 AM, mark florisson >> wrote: >>> On 16 October 2012 18:48, Robert Bradshaw wrote: >>>> On Sun, Oct 14, 2012 at 6:13 AM, mar

Re: [Cython] Any more fixes for 0.17.2?

2012-11-04 Thread mark florisson
On 4 November 2012 01:23, Robert Bradshaw wrote: > > On Nov 3, 2012 4:22 PM, "Stefan Behnel" wrote: >> >> Hi, >> >> the 0.17 branch has gained a couple of fixes, so I'd like to release a >> 0.17.2 some time next week. > > You read my mind. > >> In case you have other things to add to it within th

Re: [Cython] Any more fixes for 0.17.2?

2012-11-04 Thread mark florisson
On 4 November 2012 12:04, Stefan Behnel wrote: > mark florisson, 04.11.2012 13:00: >>> >>> On Nov 3, 2012 4:22 PM, "Stefan Behnel" wrote: >>>> >>>> the 0.17 branch has gained a couple of fixes, so I'd like to release a >>>>

Re: [Cython] Any more fixes for 0.17.2?

2012-11-04 Thread mark florisson
On 4 November 2012 12:56, Stefan Behnel wrote: > mark florisson, 04.11.2012 13:45: > >> It seems that some tests are failing in cython-devel >> since commit 'disable some Cython syntax in .py compilation mode: >> typecasts, &..., sizeof()', but you're p

Re: [Cython] Any more fixes for 0.17.2?

2012-11-04 Thread mark florisson
On 4 November 2012 12:04, Stefan Behnel wrote: > > mark florisson, 04.11.2012 13:00: >>> >>> On Nov 3, 2012 4:22 PM, "Stefan Behnel" wrote: >>>> >>>> the 0.17 branch has gained a couple of fixes, so I'd like to release a >>>

Re: [Cython] Custom automatic type conversions from/to C++

2012-11-05 Thread mark florisson
On 4 November 2012 22:32, Olivier Parcollet wrote: > Hello, > > I would like to write some automatic C++/python conversionsfor the > classes of my project > in addition to std::vector and others std:: objects. > > Conversions for std:: objects are written in > Cython/Utility/CppConvert.pyx, i.e. a

Re: [Cython] Any more fixes for 0.17.2?

2012-11-07 Thread mark florisson
On 6 November 2012 22:21, Stefan Behnel wrote: > mark florisson, 04.11.2012 14:07: >> On 4 November 2012 12:56, Stefan Behnel wrote: >>> mark florisson, 04.11.2012 13:45: >>> >>>> It seems that some tests are failing in cython-devel >>>> since co

Re: [Cython] Any more fixes for 0.17.2?

2012-11-07 Thread mark florisson
On 7 November 2012 10:47, mark florisson wrote: > On 6 November 2012 22:21, Stefan Behnel wrote: >> mark florisson, 04.11.2012 14:07: >>> On 4 November 2012 12:56, Stefan Behnel wrote: >>>> mark florisson, 04.11.2012 13:45: >>>> >>>>

Re: [Cython] Any more fixes for 0.17.2?

2012-11-10 Thread mark florisson
On 9 November 2012 20:41, Stefan Behnel wrote: > mark florisson, 07.11.2012 11:48: >> On 7 November 2012 10:47, mark florisson wrote: >>> On 6 November 2012 22:21, Stefan Behnel wrote: >>>> mark florisson, 04.11.2012 14:07: >>>>> On 4 November

Re: [Cython] redefining PyIndex_Check

2012-11-11 Thread mark florisson
On 11 November 2012 08:12, Stefan Behnel wrote: > Hi, > > instead of overriding an existing definition of "PyIndex_Check" like this: > > """ > +#if PY_VERSION_HEX < 0x0205 > +/* NumPy headers define PyIndex_Check incorrectly */ > +#undef PyIndex_Check > +#define PyIndex_Check(o) (P

Re: [Cython] redefining PyIndex_Check

2012-11-11 Thread mark florisson
On 11 November 2012 13:04, Stefan Behnel wrote: > mark florisson, 11.11.2012 12:26: >> On 11 November 2012 08:12, Stefan Behnel wrote: >>> instead of overriding an existing definition of "PyIndex_Check" like this: >>> >>> """ >>

Re: [Cython] redefining PyIndex_Check

2012-11-11 Thread mark florisson
On 11 November 2012 14:09, mark florisson wrote: > On 11 November 2012 13:04, Stefan Behnel wrote: >> mark florisson, 11.11.2012 12:26: >>> On 11 November 2012 08:12, Stefan Behnel wrote: >>>> instead of overriding an existing definition of "PyIndex_Check&

Re: [Cython] memoryview of extension types: warnings with gcc, errors with g++

2012-11-30 Thread mark florisson
On 30 November 2012 00:45, Matěj Laitl wrote: > Hi list and Mark, > it seems that C code with questionable casts is generated when using memory > views of extension types. I get following warnings from gcc: > > extension_type_memoryview.c: In function > ‘__pyx_pf_25extension_type_memoryview_test_

Re: [Cython] (no subject)

2012-12-05 Thread mark florisson
ey M. Froehle wrote: > >>I ran `git bisect`: >>d96dfdbb290d23bf3b4a186dc5b1b5d9ee7fcaa5 is the first bad commit >>commit d96dfdbb290d23bf3b4a186dc5b1b5d9ee7fcaa5 >>Author: Mark Florisson <[1]markflorisso...@gmail.com> >>Date: � Tue Apr 10 1

Re: [Cython] (no subject)

2012-12-05 Thread mark florisson
On 5 December 2012 17:11, mark florisson wrote: > On 5 December 2012 16:54, Yaroslav Halchenko wrote: >> Thank you Bradley, >> >> This was easy enough even so that I could fix it (I think) -- just a >> typo: >> >> https://github.com/cython/cython/p

Re: [Cython] releasing 0.18?

2012-12-15 Thread mark florisson
On 15 December 2012 17:34, Stefan Behnel wrote: > Hi, > > the current master doesn't really have the one new, great&shiny feature, > but I don't see a reason to keep the changes back that we have implemented > so far. Robert's const support and the integer overflow checks (assuming > that both are

Re: [Cython] releasing 0.18?

2013-01-13 Thread mark florisson
On 13 January 2013 06:49, Stefan Behnel wrote: > Hi, > > haven't heard from Mark yet, but would anyone object to releasing a beta in > a couple of days? > > Stefan > > ___ > cython-devel mailing list > cython-devel@python.org > http://mail.python.org/mai

Re: [Cython] "minierror" in Shadow.py?

2013-01-19 Thread mark florisson
On 19 January 2013 07:22, Stefan Behnel wrote: > Hi, > > I just wanted to release 0.18 beta1 when I noticed this code in Shadow.py, > function index_type(): > > """ > raise minierror.InvalidTypeSpecification( > "Only a step of 1 may be provided to indicate C or " >

Re: [Cython] analyse_types() refactoring

2013-02-07 Thread mark florisson
On 7 February 2013 11:32, Stefan Behnel wrote: > Hi, > > I finally found the time to refactor the analysis phase. > > https://github.com/cython/cython/commit/f9c385e08401ed96b5b0afb8411480037dc772b9 > > The methods now return a node, which allows them to replace themselves with > a different imple

Re: [Cython] How does a fused function differ from an overloaded function?

2013-02-09 Thread mark florisson
On 9 February 2013 03:44, Stefan Behnel wrote: > Hi, > > I noticed that Cython currently fails to do this: > >cdef int (*int_abs)(int x) >cdef object py_abs >py_abs = int_abs = abs > > Here, abs() is an overloaded function with a couple of C signatures (fabs() > and friends) and a Pyth

Re: [Cython] Fwd: MemoryView.is_f_contig sometimes not defined?

2013-02-09 Thread mark florisson
On 9 February 2013 07:03, David Hirschfeld wrote: > Reposting because I think my original got blocked because of > attachments. Apologies if this appears twice. > > I want to allow arbitrary C/F contiguous arrays as input to a cdef > class so I can dispatch to a different calculation method in eac

Re: [Cython] How does a fused function differ from an overloaded function?

2013-02-10 Thread mark florisson
On 9 February 2013 23:56, Stefan Behnel wrote: > mark florisson, 10.02.2013 03:25: >> On 9 February 2013 03:44, Stefan Behnel wrote: >>> Hi, >>> >>> I noticed that Cython currently fails to do this: >>> >>>cdef int (*int_abs)(int x) &

Re: [Cython] Possible bug when using cython -Wextra

2013-02-14 Thread mark florisson
On 14 February 2013 05:08, Robert Bradshaw wrote: > On Thu, Feb 7, 2013 at 10:05 AM, Stefan Behnel wrote: >> Samuele Kaplun, 07.02.2013 13:00: >>> In data giovedì 7 febbraio 2013 12:11:47, Stefan Behnel ha scritto: > [...] > > def test(): > cdef int i > > for i fro

Re: [Cython] [cython-users] freelist benchmarks

2013-02-24 Thread mark florisson
On 24 February 2013 17:50, mark florisson wrote: > On 24 February 2013 15:58, Stefan Behnel wrote: >> mark florisson, 24.02.2013 15:50: >>> On 24 February 2013 13:52, Stefan Behnel wrote: >>>> for those who haven't notice my other e-mail, I implemented

Re: [Cython] [cython-users] freelist benchmarks

2013-02-24 Thread mark florisson
On 24 February 2013 15:58, Stefan Behnel wrote: > mark florisson, 24.02.2013 15:50: >> On 24 February 2013 13:52, Stefan Behnel wrote: >>> for those who haven't notice my other e-mail, I implemented a new extension >>> type decorator "@cython.freelis

Re: [Cython] Refcount error with fused types in classes

2013-03-17 Thread mark florisson
On 17 March 2013 16:15, Pauli Virtanen wrote: > Hi, > > Here's a snippet demonstrating a refcount error with fused types inside > classes: > > -8<- > cimport cython > > ctypedef fused some_t: > int > double > > class Foo(object): > def bar(self, some_t x): > pas

Re: [Cython] Upcoming cython/numpy breakage with stride checking

2013-04-09 Thread mark florisson
On 9 April 2013 02:04, Dave Hirschfeld wrote: > Dag Sverre Seljebotn writes: > > > > > cdef np.ndarray[double, mode='fortran'] arr > > > > that relies on PEP 3118 contiguous-flags and I did no checking myself. > > Lots of Cython code does this instead of memoryviews (I still write my > > own cod

Re: [Cython] Upcoming cython/numpy breakage with stride checking

2013-04-09 Thread mark florisson
On 8 April 2013 13:04, Sebastian Berg wrote: > On Mon, 2013-04-08 at 12:31 +0200, Dag Sverre Seljebotn wrote: > > On 04/08/2013 09:59 AM, Sebastian Berg wrote: > > > On Mon, 2013-04-08 at 08:42 +0200, Dag Sverre Seljebotn wrote: > > >> On 04/06/2013 04:19 PM, Nathaniel Smith wrote: > > >>> Hi all

Re: [Cython] Upcoming cython/numpy breakage with stride checking

2013-04-09 Thread mark florisson
On 9 April 2013 13:09, mark florisson wrote: > > > > On 8 April 2013 13:04, Sebastian Berg wrote: > >> On Mon, 2013-04-08 at 12:31 +0200, Dag Sverre Seljebotn wrote: >> > On 04/08/2013 09:59 AM, Sebastian Berg wrote: >> > > On Mon, 2013-04-08

Re: [Cython] Shared Cython runtime (was: Upcoming cython/numpy breakage with stride checking)

2013-04-09 Thread mark florisson
On 9 April 2013 14:11, Stefan Behnel wrote: > Nathaniel Smith, 09.04.2013 15:00: > > On 9 Apr 2013 13:50, "Stefan Behnel" wrote: > >> Nathaniel Smith, 09.04.2013 14:25: > >> There's also the problem of dependency hell and getting rid of old > modules > >> once they are no longer used on the user

Re: [Cython] Shared Cython runtime (was: Upcoming cython/numpy breakage with stride checking)

2013-04-09 Thread mark florisson
On 9 April 2013 14:24, Stefan Behnel wrote: > mark florisson, 09.04.2013 15:13: > > On 9 April 2013 14:11, Stefan Behnel wrote: > >> Nathaniel Smith, 09.04.2013 15:00: > >>> On 9 Apr 2013 13:50, "Stefan Behnel" wrote: > >>>> There'

Re: [Cython] Shared Cython runtime (was: Upcoming cython/numpy breakage with stride checking)

2013-04-09 Thread mark florisson
On 9 April 2013 14:33, mark florisson wrote: > > > On 9 April 2013 14:24, Stefan Behnel wrote: > >> mark florisson, 09.04.2013 15:13: >> > On 9 April 2013 14:11, Stefan Behnel wrote: >> >> Nathaniel Smith, 09.04.2013 15:00: >> >>> On 9 Apr 2

Re: [Cython] Shared Cython runtime (was: Upcoming cython/numpy breakage with stride checking)

2013-04-09 Thread mark florisson
On 9 April 2013 14:35, mark florisson wrote: > > > On 9 April 2013 14:33, mark florisson wrote: > >> >> >> On 9 April 2013 14:24, Stefan Behnel wrote: >> >>> mark florisson, 09.04.2013 15:13: >>> > On 9 April 2013 14:11, Stefan Behnel wr

Re: [Cython] Shared Cython runtime (was: Upcoming cython/numpy breakage with stride checking)

2013-04-09 Thread mark florisson
On 9 April 2013 14:46, Nathaniel Smith wrote: > On Tue, Apr 9, 2013 at 2:11 PM, Stefan Behnel wrote: > > Nathaniel Smith, 09.04.2013 15:00: > >> On 9 Apr 2013 13:50, "Stefan Behnel" wrote: > >>> Nathaniel Smith, 09.04.2013 14:25: > >>> There's also the problem of dependency hell and getting rid

Re: [Cython] Shared Cython runtime (was: Upcoming cython/numpy breakage with stride checking)

2013-04-09 Thread mark florisson
On 9 April 2013 14:55, Nikita Nemkin wrote: > On Tue, 09 Apr 2013 19:33:20 +0600, mark florisson < > markflorisso...@gmail.com> wrote: > >> On 9 April 2013 14:24, Stefan Behnel wrote: >> >> mark florisson, 09.04.2013 15:13: >>> > On 9 April 2013

Re: [Cython] Shared Cython runtime (was: Upcoming cython/numpy breakage with stride checking)

2013-04-09 Thread mark florisson
On 9 April 2013 15:47, Stefan Behnel wrote: > mark florisson, 09.04.2013 16:32: > > On 9 April 2013 14:55, Nikita Nemkin wrote: > >> One alternative for code reuse in large Cython projects > >> could be packaging multiple modules into one shared library. > > &g

Re: [Cython] Shared Cython runtime (was: Upcoming cython/numpy breakage with stride checking)

2013-04-09 Thread mark florisson
On 9 April 2013 15:45, Nathaniel Smith wrote: > On Tue, Apr 9, 2013 at 3:32 PM, mark florisson > wrote: > > On 9 April 2013 14:55, Nikita Nemkin wrote: > >> One alternative for code reuse in large Cython projects > >> could be packaging multiple modules into one s

Re: [Cython] [PATCH] Refcount error when transposing memoryview attribute of an extension class

2013-04-12 Thread mark florisson
On 12 April 2013 13:20, Matěj Laitl wrote: > On 8. 4. 2013 Matěj Laitl wrote: > > Hi cython-devel and Mark, > > I was getting > > > > > Fatal Python error: Acquisition count is 0 (line XYZ) > > > > when I was doing > > > > > cdef class MemViewContainer: > > > cdef double[:, :] A > > > > > >

Re: [Cython] CF based type inference

2013-05-21 Thread mark florisson
On 21 May 2013 11:26, Vitja Makarov wrote: > Hi! > > Recently I've started work on new type inference engine. Now it's almost > ready and I want to discuss it. > > It works like this: first infer type for each assignment then for whole > entry. It has some advantages over previous algorithm: > -

Re: [Cython] CF based type inference

2013-05-21 Thread mark florisson
On 21 May 2013 14:14, Vitja Makarov wrote: > > > > 2013/5/21 mark florisson >> >> On 21 May 2013 11:26, Vitja Makarov wrote: >> > Hi! >> > >> > Recently I've started work on new type inference engine. Now it's almost >> > rea

Re: [Cython] CF based type inference

2013-05-21 Thread mark florisson
On 21 May 2013 14:41, Vitja Makarov wrote: > > > > 2013/5/21 mark florisson >> >> On 21 May 2013 14:14, Vitja Makarov wrote: >> > >> > >> > >> > 2013/5/21 mark florisson >> >> >> >> On 21 May 2013 11:26, Vitj

Re: [Cython] Compiler crash fix

2013-05-22 Thread mark florisson
On 22 May 2013 10:13, Nikita Nemkin wrote: > Hi, > > Someone please apply this patch (too simple for pull request): > > diff --git a/Cython/Compiler/ExprNodes.py b/Cython/Compiler/ExprNodes.py > index 0406fad..640d002 100755 > --- a/Cython/Compiler/ExprNodes.py > +++ b/Cython/Compiler/ExprNodes.py

Re: [Cython] CF based type inference

2013-06-02 Thread mark florisson
On 2 June 2013 07:22, Stefan Behnel wrote: > mark florisson, 21.05.2013 15:32: >> On 21 May 2013 14:14, Vitja Makarov wrote: >>> >>> def foo(int N): >>> x = 1 >>> y = 0 >>> for i in range(N): >>> x = x * 0.1 + y

Re: [Cython] "relaxed_strides" test broken with NumPy 1.8

2014-01-03 Thread mark florisson
On 3 January 2014 18:22, Stefan Behnel wrote: > Hi, > > I enabled the NumPy build for our Py3.3 test runs and while I was at it, I > got it to use the latest NumPy release 1.8. This made one of the tests fail: > > """ > Traceback (most recent call last): > File ".../doctest.py", line 131

Re: [Cython] memory view creation during cascaded assignments

2014-07-05 Thread Mark Florisson
Hi Stefan, On 5 July 2014 11:34, Stefan Behnel wrote: > Hi, > > I started optimising cascaded assignments a little to reduce the > unnecessary duplication of coercions. While doing that, I found this test > in memslice.pyx: > > ''' > def cascaded_buffer_assignment(obj): > """ > >>> A = In

[Cython] overflow bug?

2015-07-14 Thread Mark Florisson
Hi, I think this might be a bug (python 3.3 + cython 0.22.1): def f(term=b"12345"): val = int('987278186585') # The below line does not work, because it treats 1 as a constant integer # in the C code (32 bit on my machine). Using 1L does work however. val -= 1 << (len(term) *

<    2   3   4   5   6   7