[Numpy-discussion] A little help please?

Travis E. Oliphant oliphant at enthought.com
Sat Mar 1 23:45:29 EST 2008


Travis E. Oliphant wrote:
> Neal Becker wrote:
>   
>> Travis E. Oliphant wrote:
>>
>>
>>   
>>
>> The code for this is a bit hard to understand.  It does appear that it only
>> searches for a conversion on the 2nd argument.  I don't think that's
>> desirable behavior.
>>
>> What I'm wondering is, this works fine for builtin types.  What is different
>> in the handling of builtin types?
>>   
>>     
>
> 3) For user-defined types the 1d loops (functions) for a particular 
> user-defined type are stored in a linked-list that itself is stored in a 
> Python dictionary (as a C-object) attached to the ufunc and keyed by the 
> user-defined type (of the first argument).
>
> Thus, what is missing is code to search all the linked lists in all the 
> entries of all the user-defined types on input (only the linked-list 
> keyed by the first user-defined type is searched at the moment).    This 
> would allow similar behavior to the built-in types (but a bit more 
> expensive searching).
>   
This code is now in place in current SVN.  Could you re-try your example 
with the current code-base to see if it is fixed.

Thanks,

-Travis





More information about the NumPy-Discussion mailing list