[SciPy-dev] new sparsetools + umfpack

Travis Oliphant oliphant at ee.byu.edu
Wed Jan 10 10:32:39 EST 2007


Nathan Bell wrote:

>On 1/10/07, Robert Cimrman <cimrman3 at ntc.zcu.cz> wrote:
>  
>
>  
>
>>Therefore, if there are no objections, I would like to remove the
>>implicit call to ensure_sorted_indices() from umfpack and require user
>>to call it explicitly (only if necessary) - an exception will be raised
>>by umfpack if the matrix is not in correct form, so it cannot lead to
>>hidden bugs. I will document this in linsolve, of course.
>>    
>>
>
>Personally, I think it's best to hide these details from the user as
>much as possible.  If the performance penalty is more than 10%, then
>perhaps it should be changed.  Otherwise I think simplicity wins.
>  
>
This is my feeling as well.  I get a little uncomfortable when the 
average UMFPACK user has to be aware of calling ensure_sorted_indices.  
That seems a little too much for me, as well.

Having a flag on the object just means that anybody who manipulates the 
data directly would need to call the update-flag routine or risk later 
problems.  This is the case with NumPy.  If you manipulate the strides 
but don't update the flags (in C), then you can break things.   This 
should not be onerous and somebody who is manipulating the underlying 
format directly.  Because they must understand these issues to play with 
things directly.

I think it is better to force power users to understand that they must 
call the "._update_sort_flag" method if they manipulate the entries 
rather than regular users having to understand that they must call 
"enusre_sorted_indices" before calling a simple solve routine.

My $.02

-Travis




More information about the SciPy-Dev mailing list