ime.
>
> We should take a look at how other implementations do this dispatch. There
> are multiple "generic functions" implementations for Python that do similar
> things.
I agree that there probably is room for improvement, possibly also
speed-wise.
I'll try to rev
22.03.2014 14:48, Pauli Virtanen kirjoitti:
[clip]
> I can take a look at this today...
Here's one attempt:
https://github.com/cython/cython/pull/284
In the long run, I'd like to be able to write code like this:
https://github.com/pv/scipy-work/blob/csparsetools-nocrud
instantiated in
several different ways.
I can take a look at this today...
(Re: Sturla: I *want* a bloatware generator, but a controllable one :)
--
Pauli Virtanen
___
cython-devel mailing list
cython-devel@python.org
https://mail.python.org/mailman/listinfo/cython-devel
Hi,
Here are the fused types + memoryview signature resolution failures I
promised earlier (Cython 0.20.1):
(A)
TypeError: No matching signature
- asd.pyx
cimport numpy as cnp
ctypedef fused value_t:
cnp.float32_t
cnp.float64_t
cpdef foo(value_t x):
pa
08.03.2014 22:40, Stefan Behnel kirjoitti:
[clip]
> Yes, this is a known problem. The work-around is to ctypedef the
> memory view type, not just the dtype.
>
> http://thread.gmane.org/gmane.comp.python.cython.user/10437
Thanks, I missed that.
Re: arguments in the previous thread --- I think it
y arguments and more than one fused type. I think this issue is
also accompanied by some signature resolution bugs (I'll try to come
up with an example case).
Cheers,
--
Pauli Virtanen
___
cython-devel mailing list
cython-devel@python.org
https://mail.python.org/mailman/listinfo/cython-devel
ccur in topmost
> cdef classes.
>
> Here's an example: (See the module docstring on how to compile and run the
> example.)
Cannot reproduce the failure on Cython 0.19.1. If you are using an
earlier version, please try that instead.
One bug with memory leaks in cdef classes wa
W, switching from np.ndarray+templating to fused types+memoryviews
increased the stripped size of scipy.interpolate.interpnd [1] from 368k
to 633k.
[1] https://github.com/scipy/scipy/pull/211
--
Pauli Virtanen
___
cython-devel mailing list
cython-deve
17.03.2013 19:18, Pauli Virtanen kirjoitti:
> Hi,
>
> 17.03.2013 18:51, mark florisson kirjoitti:
> [clip]
>> Thanks, I pushed a fix here: https://github.com/markflorisson88/cython
>> (fd4853d202b13a92).
>
> Thanks. You beat me to this, I just arrived at the same fi
Hi,
17.03.2013 18:51, mark florisson kirjoitti:
[clip]
> Thanks, I pushed a fix here: https://github.com/markflorisson88/cython
> (fd4853d202b13a92).
Thanks. You beat me to this, I just arrived at the same fix :)
Cheers,
Pauli
___
cython-devel mailin
(object)
def main():
x = Foo()
print "before:", Py_REFCNT(x)
x.bar(1.0) # spuriously increments refcount of `x`
print "after: ", Py_REFCNT(x)
-----8<-
--
Pauli Virtanen
___
cython-devel mailing list
cytho
11.06.2012 21:23, Pauli Virtanen kirjoitti:
> Hi,
>
> 11.06.2012 21:16, mark florisson kirjoitti:
> [clip]
>> Yeah, there was some weird bug with PyIndex_Check() not operating
>> properly. Could you retry with the latest master?
>
> Doesn't seem to work in 5a0
11.06.2012 21:17, mark florisson kirjoitti:
[clip]
> Thanks, could you provide a pull request? That makes it easier to
> merge and assign credit.
Ok, this one seemed to already have been fixed in Cython master.
Pauli
___
cython-devel mailing li
11.06.2012 21:17, mark florisson kirjoitti:
[clip]
> Thanks, could you provide a pull request? That makes it easier to
> merge and assign credit.
Ok, I'll try to not only just complain :)
BRB,
Pauli
___
cython-devel mailing list
cython-devel@p
Hi,
11.06.2012 21:16, mark florisson kirjoitti:
[clip]
> Yeah, there was some weird bug with PyIndex_Check() not operating
> properly. Could you retry with the latest master?
Doesn't seem to work in 5a0effd0 :(
Traceback (most recent call last):
File "", line 1, in ?
File "fail.pyx", line 1
581,7 @@ static PyTypeObject __pyx_CyFunctionType_type = {
0,
0,
0,
-__Pyx_PyCFunction_Call,
+__Pyx_PyCFunction_Call_wrap,
0,
0,
0,
...
It's a bit surprising to me that you cannot use the function from the
Python headers as a static initializer on that pl
Hi,
This doesn't work on Python 2.4 (works on >= 2.5):
cimport numpy as np
import numpy as np
def _foo():
cdef double[:] a
a = np.array([1.0])
return np.asarray(a)
def foo():
print _foo()
Spotted when using Cython 1.6 in Scipy. Results to:
Python 2.4.
language,
but such a feature would find immediate practical use.
--
Pauli Virtanen
___
cython-devel mailing list
cython-devel@python.org
http://mail.python.org/mailman/listinfo/cython-devel
On Thu, 07 Jul 2011 20:10:30 +0200, Dag Sverre Seljebotn wrote:
[clip]
> 5 minutes of Googling didn't turn up anything... Do you think it would
> be a bad idea to simply delete these branches, something like
>
> git push origin :refs/*
That drops *all* branches -- not recommended :)
As far as I
On Thu, 07 Jul 2011 15:28:36 +0200, Stefan Behnel wrote:
> there's something broken with the repo recently. Even in a fresh
> checkout, I see 25 heads, most of which were supposed to be merges into
> the master branch (mainly button merges). The github web site doesn't
> show these, it only has thr
Fri, 29 Apr 2011 16:59:22 +0200, mark florisson wrote:
[clip]
> Hmm, indeed, it's pretty weird. I'm fine with the pairing also, although
> I'm still not sure how common this case is, and if we really want to
> support it. Wouldn't good old C promotion work for this? e.g. if the
> type is either flo
me way as "long int" is, and writing
"real_t complex" feels a bit like writing "int_t long".
But of course, if this feature is really only needed for declaring
complex variants of real types, then how it is done doesn't matter
so much. But, IMH
Fri, 29 Apr 2011 11:30:19 +0200, mark florisson wrote:
> On 29 April 2011 11:03, Pauli Virtanen wrote:
[clip]
>> Are you planning to special-case the "real_t complex" syntax? Shooting
>> from the sidelines, one more generic solution might be, e.g.,
>
> I'm sor
B) struct_t
ctypedef cython.fused_type(float, double, paired=struct_t) real_t
ctypedef cython.fused_type(int_t, string_t, paired=struct_t) var_t
and just restrict the specialization to cases that make sense.
--
Pauli Virtanen
_
Tue, 05 Apr 2011 12:55:36 +, Pauli Virtanen wrote:
[clip]
> # Assignment to non-private variables causes a compile-time
> # error; this avoids common mistakes, such as forgetting to
> # declare the reduction variable.
>
dding the variable declarations.
--
Pauli Virtanen
___
cython-devel mailing list
cython-devel@python.org
http://mail.python.org/mailman/listinfo/cython-devel
? Does the Cython compiler keep track if
GIL is acquired or not?
--
Pauli Virtanen
___
cython-devel mailing list
cython-devel@python.org
http://mail.python.org/mailman/listinfo/cython-devel
27 matches
Mail list logo