Re: [Numpy-discussion] ufunc and errors

2009-10-03 Thread Dag Sverre Seljebotn
Robert Kern wrote: On Wed, Sep 30, 2009 at 09:34, Dag Sverre Seljebotn da...@student.matnat.uio.no wrote: I looked and looked in the docs, but couldn't find an answer to this: When writing a ufunc, is it possible somehow to raise a Python exception (by acquiring the GIL first to raise it, set

Re: [Numpy-discussion] ufunc and errors

2009-10-01 Thread Pauli Virtanen
Wed, 30 Sep 2009 10:33:46 -0500, Robert Kern wrote: [clip] Also, will the arguments always be named x1, x2, x3, ..., or can I somehow give them custom names? The only place where names appear is in the docstring. Write whatever text you like. The first line of the docstring is generated by

[Numpy-discussion] ufunc and errors

2009-09-30 Thread Dag Sverre Seljebotn
I looked and looked in the docs, but couldn't find an answer to this: When writing a ufunc, is it possible somehow to raise a Python exception (by acquiring the GIL first to raise it, set a flag and a callback which will be called with the GIL, or otherwise?). Or should one always use NaN even

Re: [Numpy-discussion] ufunc and errors

2009-09-30 Thread Robert Kern
On Wed, Sep 30, 2009 at 09:34, Dag Sverre Seljebotn da...@student.matnat.uio.no wrote: I looked and looked in the docs, but couldn't find an answer to this: When writing a ufunc, is it possible somehow to raise a Python exception (by acquiring the GIL first to raise it, set a flag and a