30 Sep
2009
30 Sep
'09
8:34 a.m.
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 if the input does not make any sense (like, herhm, passing anything but integers or half-integers to a Wigner 3j symbol). I know how I'd to it manually in a wrapper w/ passed in context if not, but wanted to see. Also, will the arguments always be named x1, x2, x3, ..., or can I somehow give them custom names? Dag Sverre