[SciPy-dev] [announce] scikits.sparse v0.1, wrapper for CHOLMOD (and hopefully more)

Robert Cimrman cimrman3@ntc.zcu...
Sat Dec 26 08:44:24 CST 2009


Quoting josef.pktd@gmail.com:

> On Sat, Dec 26, 2009 at 4:25 AM, Ondrej Certik <ondrej@certik.cz> wrote:
>> On Fri, Dec 25, 2009 at 12:06 AM, Nathaniel Smith <njs@pobox.com> wrote:
>>> On Thu, Dec 24, 2009 at 9:57 AM,  <josef.pktd@gmail.com> wrote:
>>>> On Thu, Dec 24, 2009 at 10:49 AM, Ondrej Certik <ondrej@certik.cz> wrote:
>>>>> On Thu, Dec 24, 2009 at 4:40 PM, Gael Varoquaux
>>>>> <gael.varoquaux@normalesup.org> wrote:
>>>>>> On Thu, Dec 24, 2009 at 04:00:21PM +0100, Robert Cimrman wrote:
>>>>>>> I would like to hear some feedback to my original naming style  
>>>>>>>   question,
>>>>>>> as I face same issues in my projects too. The question is about using
>>>>>>> function names that mix underscores with capital letters, e.g.
>>>>>>> solve_P(). This style is marked "bad" in the Python docs, but in linear
>>>>>>> algebra, matrices are commonly denoted by capital letters. So   
>>>>>>>  what do you
>>>>>>> think?
>>>>>>
>>>>>> Bad.
>>>>>
>>>>> Good.
>>>>
>>>> Bad in general. (If you mix arrays and matrices it might be helpful
>>>> internally as a reminder.)
>>>>
>>>> And I like informative names, where I don't need a book or paper to
>>>> follow the notation, and go back to the table of shortcut definitions
>>>> or docstrings every five minutes. My short term memory is too short to
>>>> remember what A,B,C, P, X, Y, ... and phi, psi, omega,... mean in
>>>> different contexts. But this depends on whether you program for
>>>> insiders or the general public.
>>>
>>> I agree with all the general principles here, but still stand by the
>>> current function names in this case. PEP8 and all that are a tool to
>>> help us write clear and usable code, and should be ignored when their
>>> prescriptions don't help us do that. Obviously when this happens is a
>>> matter of taste... But here, we're talking about object that
>>> represents the factorization
>>>  LDL' = PAP'
>>> or
>>>  LL' = PAP'
>>> and we need to refer to expressions like DL'.
>>>
>>> These are standard names in the literature, used consistently through
>>> the docs, and what else can you call the parts of a Cholesky factor
>>> that would be more informative than confusing? Esp. since the solve_*
>>> interfaces are pretty much expert only; people who just want to solve
>>> a positive-definite system won't see them.
>>
>> Yes, I agree with you.
>>
>> Ondrej
>
> I was answering the general question of Robert. In this case, I also
> agree, especially because they are methods and not functions.
> I finally looked at the manual, which looks very informative.
>
> The only method names, I got stuck with, are
>
> Factor.L_D() versus Factor.LD() and warning with Factor.L()
>
> Factor.L()  is Factor.L_inLL
> Factor.L_D() is Factor.L_inLDL
>
> and does L in Factor.solve_L()  refer to L in LL or in LDL ?  or is it
> irrelevant?
>
> just a comment  from a non-expert
>
> Josef

Yes, I also prefer the above instead of some artificial long names in
this particular case of the cholmod wrappers. Thanks also for all the
opinions on my general question.

My only concern regarding the cholmod wrappers is whether to collect
several similar groups of functions into a function per group, or not.
But I am ok with the way it is now.

r.




More information about the SciPy-Dev mailing list