> The above strikes me as a bit too much magic under the hood -- perhaps
> I can get used to it.  My initial preference would be to have some
> indication that this is a 'ufuncable' function, or is intended to be
> so; Cython could then check to be sure the dummy arguments & return
> type are primitive.  (Although I reckon this check would be done
> during compilation once someone tries to pass a numpy array to a cdef
> function with primitive-type arguments.)

How difficult would it be to have a way to add general flags to
functions (like nogil?), so one could write

cdef extern from "math.h":
   double cos(double) ufunc

and then optimizing plugins like the ones I mentioned earlier could
pick up these flags and treat it appropriately.

-- Hoyt

P.S. I know that every open source project absolutely loves people
with more suggestions than willingness to look at the code <end
sarcasm>, but I do think cython is very well designed and I'd like to
follow what's there.  I just get excited about small things I can get
my head around and think I might be able to do, so as I get to learn
the cython code base more I hope to be able to contribute suggestions
more productively.


++++++++++++++++++++++++++++++++++++++++++++++++
+ Hoyt Koepke
+ University of Washington Department of Statistics
+ http://www.stat.washington.edu/~hoytak/
+ [email protected]
++++++++++++++++++++++++++++++++++++++++++
_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev

Reply via email to