[Numpy-discussion] A little help please?

Neal Becker ndbecker2@gmail....
Thu Feb 28 07:21:54 CST 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.
>>
...
> 
> 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).
> 

Sounds like this needs a bit of re-thinking.

Given a set of function signatures:
F(a,b,c)
F(d,e,f)
...

The user calls:
F(A,B,C) (no relation between a,A ,etc)

How do we find the 'best' match?

I think we can start with:
Rules:
1) Only allowed (at most) 1 conversion on each argument

But what is the 'best' match mean?

I think that can't be decided without some sort of hierarchical relation of
the types.

Now given a hierarchy, I still don't know the solution, but it sounds like
some kind of graph algorithm.




More information about the Numpy-discussion mailing list