On Wed, Mar 19, 2008 at 10:42 AM, Travis E. Oliphant <[EMAIL PROTECTED]> wrote:
> Neal Becker wrote: > > In arrayobject.c, various complex functions (e.g., array_imag_get) use: > > PyArray_ISCOMPLEX -> PyTypeNum_ISCOMPLEX, > > which is hard coded to 2 predefined types :( > > > > If PyArray_ISCOMPLEX allowed user-defined types, I'm guessing functions > such > > as array_imag_get would just work? > > > I don't think that it true. There would need to be some kind of idea > of "complex-ness" that is tested. One way this could work is if your > corresponding scalar inherited from the generic complex scalar type and > then that was tested for. > That brings up a question I have. In looking to introduce float16, I noted that the typenumbers are tightly packed at the low end. There is space for user defined types >=128, IIRC, but float16 and cfloat16 really belongs down with the numbers. There are also several other types in the IEEE pipeline. So I am wondering if we can't spread the type numbers out a bit more. Chuck
_______________________________________________ Numpy-discussion mailing list [email protected] http://projects.scipy.org/mailman/listinfo/numpy-discussion
