Re: [Numpy-discussion] anyone to look at #1402?

2010-02-26 Thread David Cournapeau
Gael Varoquaux wrote:
> On Fri, Feb 26, 2010 at 07:23:54PM +0900, David Cournapeau wrote:
>> David Warde-Farley wrote:
>>> My first
>>> instinct would be to look for "logdet", but I would also not expect such
>>> a function to return the log determinant *and* the sign of the 
>>> determinant.
> 
>> What about having logadet for the (common) case where log |A| only is 
>> needed, and having the more complex function when the sign is needed as 
>> well ?
> 
> I was more thinking of a 'return_sign=False' keyword argument.

I think the consensus in python community is to actually create two 
functions when the returned values' kind differ depending on a boolean.

cheers,

David
___
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] anyone to look at #1402?

2010-02-26 Thread David Warde-Farley
On Fri, Feb 26, 2010 at 11:26:28AM +0100, Gael Varoquaux wrote:

> I was more thinking of a 'return_sign=False' keyword argument.

My thoughts exactly.

David
___
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] anyone to look at #1402?

2010-02-26 Thread Gael Varoquaux
On Fri, Feb 26, 2010 at 07:23:54PM +0900, David Cournapeau wrote:
> David Warde-Farley wrote:
> > My first
> > instinct would be to look for "logdet", but I would also not expect such
> > a function to return the log determinant *and* the sign of the 
> > determinant.

> What about having logadet for the (common) case where log |A| only is 
> needed, and having the more complex function when the sign is needed as 
> well ?

I was more thinking of a 'return_sign=False' keyword argument.

Gaƫl
___
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] anyone to look at #1402?

2010-02-26 Thread David Cournapeau
David Warde-Farley wrote:
> My first
> instinct would be to look for "logdet", but I would also not expect such
> a function to return the log determinant *and* the sign of the 
> determinant.

What about having logadet for the (common) case where log |A| only is 
needed, and having the more complex function when the sign is needed as 
well ?

cheers,

David
___
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] anyone to look at #1402?

2010-02-26 Thread Gael Varoquaux
On Fri, Feb 26, 2010 at 03:52:10AM -0500, David Warde-Farley wrote:
> On Thu, Feb 25, 2010 at 11:56:34PM -0800, Nathaniel Smith wrote:
> > So there's this patch I submitted:
> >   http://projects.scipy.org/numpy/ticket/1402
> > Obviously not that high a priority in the grand scheme of things (it
> > adds a function to compute the log-determinant directly), but I don't
> > want to release a version of scikits.sparse with this functionality
> > while the numpy patch is hanging in needs-review status (since the API
> > might change), so it's a bit of a blocker for me. Anyone have a minute
> > to take a look?

> I'm not someone who can act on it, but FWIW I am very much +1 on this
> addition, and the patch looks solid to me. It'd definitely be useful in
> scikits.learn, maybe scipy.stats/scikits.statsmodels too.

Indeed. The patch looks good at a first glance.

Gael
___
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] anyone to look at #1402?

2010-02-26 Thread David Warde-Farley
On Thu, Feb 25, 2010 at 11:56:34PM -0800, Nathaniel Smith wrote:
> So there's this patch I submitted:
>   http://projects.scipy.org/numpy/ticket/1402
> Obviously not that high a priority in the grand scheme of things (it
> adds a function to compute the log-determinant directly), but I don't
> want to release a version of scikits.sparse with this functionality
> while the numpy patch is hanging in needs-review status (since the API
> might change), so it's a bit of a blocker for me. Anyone have a minute
> to take a look?

I'm not someone who can act on it, but FWIW I am very much +1 on this
addition, and the patch looks solid to me. It'd definitely be useful in
scikits.learn, maybe scipy.stats/scikits.statsmodels too.

The name is a bit awkward, but I can't think of a better one. My first
instinct would be to look for "logdet", but I would also not expect such
a function to return the log determinant *and* the sign of the 
determinant.

David
___
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion