Re: [Numpy-discussion] ufuncs for structured arrays

2012-10-04 Thread Anthony Scopatz
On Thu, Oct 4, 2012 at 12:23 PM, Jay Bourque wrote: > Hey Anthony, thanks for the comments. > > On Mon, Oct 1, 2012 at 10:32 PM, Anthony Scopatz wrote: > >> Hello Jay, >> >> Cool idea! I like to see work on structured arrays. Just a couple of >> questions: >> >>- Since there are already have

Re: [Numpy-discussion] ufuncs for structured arrays

2012-10-04 Thread Jay Bourque
Hey Anthony, thanks for the comments. On Mon, Oct 1, 2012 at 10:32 PM, Anthony Scopatz wrote: > Hello Jay, > > Cool idea! I like to see work on structured arrays. Just a couple of > questions: > >- Since there are already have ufuncs for primitive dtypes (int, >float, etc), and you are

Re: [Numpy-discussion] ufuncs for structured arrays

2012-10-01 Thread Anthony Scopatz
Hello Jay, Cool idea! I like to see work on structured arrays. Just a couple of questions: - Since there are already have ufuncs for primitive dtypes (int, float, etc), and you are just acting columnwise here, can't you write a single function which interprets the dtypes, gathers the a

[Numpy-discussion] ufuncs for structured arrays

2012-10-01 Thread Jay Bourque
All, I've submitted the following pull request for NumPy: https://github.com/numpy/numpy/pull/462 This change allows ufuncs to be registered for structured arrays by using a new API method PyUFunc_RegisterLoopForStructType. For example, a ufunc could be registered to take two arrays of type 'u8,