Re: [Cython] `cdef inline` and typed memory views

2012-04-22 Thread Stefan Behnel
mark florisson, 22.04.2012 22:20: > On 21 April 2012 20:17, Dimitri Tcaciuc wrote: >> Say I want to factor out inner part of >> some N^2 loops over a flow array, I write something like >> >> cdef inline float _inner(size_t i, size_t j, float[:] x): >> cdef float d = x[i] - x[j] >> return s

Re: [Cython] `cdef inline` and typed memory views

2012-04-22 Thread Stefan Behnel
mark florisson, 22.04.2012 22:21: > On 22 April 2012 19:14, Dimitri Tcaciuc wrote: >> On Sat, Apr 21, 2012 at 2:48 PM, Stefan Behnel wrote: >>> Dimitri Tcaciuc, 21.04.2012 21:17: On a somewhat relevant node, have you considered enabling Issues page on Github? >>> >>> It was discussed, bu

Re: [Cython] `cdef inline` and typed memory views

2012-04-22 Thread Dimitri Tcaciuc
On Sun, Apr 22, 2012 at 1:20 PM, mark florisson wrote: > On 21 April 2012 20:17, Dimitri Tcaciuc wrote: >> Hey everyone, >> >> Congratulations on shipping 0.16! I think I found a problem which >> seems pretty straight forward. Say I want to factor out inner part of >> some N^2 loops over a flow a

Re: [Cython] `cdef inline` and typed memory views

2012-04-22 Thread mark florisson
On 22 April 2012 19:14, Dimitri Tcaciuc wrote: > On Sat, Apr 21, 2012 at 2:48 PM, Stefan Behnel wrote: >> Dimitri Tcaciuc, 21.04.2012 21:17: >>> On a somewhat relevant node, have you considered enabling Issues page on >>> Github? >> >> It was discussed, but the drawback of having two separate bu

Re: [Cython] `cdef inline` and typed memory views

2012-04-22 Thread mark florisson
On 21 April 2012 20:17, Dimitri Tcaciuc wrote: > Hey everyone, > > Congratulations on shipping 0.16! I think I found a problem which > seems pretty straight forward. Say I want to factor out inner part of > some N^2 loops over a flow array, I write something like > >  cdef inline float _inner(size

Re: [Cython] Cython 0.16: "eval" problem

2012-04-22 Thread Vitja Makarov
2012/4/22 Nathan Dunfield : > On Apr 22, 2012, at 1:22 PM, Vitja Makarov wrote: >> Oops, it seems to be a problem with locals() dict creation. > > Yes it does.   The following variants of my original example both work: > > ## prob.pyx version 1 > > def cy_eval(s): >    return eval(s) > > def f(x):

Re: [Cython] Cython 0.16: "eval" problem

2012-04-22 Thread Nathan Dunfield
On Apr 22, 2012, at 1:22 PM, Vitja Makarov wrote: > Oops, it seems to be a problem with locals() dict creation. Yes it does. The following variants of my original example both work: ## prob.pyx version 1 def cy_eval(s): return eval(s) def f(x): cdef int* p return cy_eval(x) ## p

Re: [Cython] Cython 0.16: "eval" problem

2012-04-22 Thread Vitja Makarov
2012/4/22 Nathan Dunfield : > With Cython 0.15, the following works with Python 2.7: > > ### start file: prob.pyx > > def f(x): >    cdef int* p >    return eval(x) > > ### end file > import pyximport; pyximport.install() import prob prob.f("5") > 5 > > but with Cython 0.16 it doesn'

Re: [Cython] `cdef inline` and typed memory views

2012-04-22 Thread Dimitri Tcaciuc
On Sat, Apr 21, 2012 at 2:48 PM, Stefan Behnel wrote: > Dimitri Tcaciuc, 21.04.2012 21:17: >> On a somewhat relevant node, have you considered enabling Issues page on >> Github? > > It was discussed, but the drawback of having two separate bug trackers is > non-negligible. Ok. I was wondering si

[Cython] Cython 0.16: "eval" problem

2012-04-22 Thread Nathan Dunfield
With Cython 0.15, the following works with Python 2.7: ### start file: prob.pyx def f(x): cdef int* p return eval(x) ### end file >>> import pyximport; pyximport.install() >>> import prob >>> prob.f("5") 5 but with Cython 0.16 it doesn't even compile: >>> import prob Error compiling

Re: [Cython] test crash in Py3.2 (NumPy/memoryview/refcounting related?)

2012-04-22 Thread mark florisson
On 22 April 2012 15:31, mark florisson wrote: > On 22 April 2012 13:34, Stefan Behnel wrote: >> mark florisson, 22.04.2012 13:54: >>> On 22 April 2012 11:57, Stefan Behnel wrote: I keep seeing test crashes in Py3.2 debug builds on Jenkins with the latest master, referring to ref-countin

Re: [Cython] test crash in Py3.2 (NumPy/memoryview/refcounting related?)

2012-04-22 Thread mark florisson
On 22 April 2012 13:34, Stefan Behnel wrote: > mark florisson, 22.04.2012 13:54: >> On 22 April 2012 11:57, Stefan Behnel wrote: >>> I keep seeing test crashes in Py3.2 debug builds on Jenkins with the latest >>> master, referring to ref-counting problems. Here, for example: >>> >>> https://sage.m

Re: [Cython] test crash in Py3.2 (NumPy/memoryview/refcounting related?)

2012-04-22 Thread Stefan Behnel
mark florisson, 22.04.2012 13:54: > On 22 April 2012 11:57, Stefan Behnel wrote: >> I keep seeing test crashes in Py3.2 debug builds on Jenkins with the latest >> master, referring to ref-counting problems. Here, for example: >> >> https://sage.math.washington.edu:8091/hudson/job/cython-devel-tests

Re: [Cython] test crash in Py3.2 (NumPy/memoryview/refcounting related?)

2012-04-22 Thread mark florisson
On 22 April 2012 11:57, Stefan Behnel wrote: > Hi, > > I keep seeing test crashes in Py3.2 debug builds on Jenkins with the latest > master, referring to ref-counting problems. Here, for example: > > https://sage.math.washington.edu:8091/hudson/job/cython-devel-tests/BACKEND=c,PYVERSION=py32-ext/3

[Cython] test crash in Py3.2 (NumPy/memoryview/refcounting related?)

2012-04-22 Thread Stefan Behnel
Hi, I keep seeing test crashes in Py3.2 debug builds on Jenkins with the latest master, referring to ref-counting problems. Here, for example: https://sage.math.washington.edu:8091/hudson/job/cython-devel-tests/BACKEND=c,PYVERSION=py32-ext/328/console and likewise in the series of builds startin

Re: [Cython] Julialang

2012-04-22 Thread Lisandro Dalcin
On 22 April 2012 08:10, Robert Bradshaw wrote: > Yes, Julia looks really cool. It's been on my radar for a while, but I > haven't had a chance to really try it out for anything yet. But I > hadn't thought about low-level Python/Cython <-> Julia integration. > That sounds very interesting. I wonder