Re: [Numpy-discussion] lstsq functionality

2010-07-21 Thread Keith Goodman
On Wed, Jul 21, 2010 at 8:24 PM, Charles R Harris wrote: > > On Wed, Jul 21, 2010 at 5:44 PM, Keith Goodman wrote: >> Can someone confirm that the copy in np.linalg.lstsq >> >> bstar[:b.shape[0],:n_rhs] = b.copy() >> >> is not needed? I'm assuming that ndarray.__setitem__ never gives a >> view o

Re: [Numpy-discussion] lstsq functionality

2010-07-21 Thread Charles R Harris
On Wed, Jul 21, 2010 at 5:44 PM, Keith Goodman wrote: > On Wed, Jul 21, 2010 at 4:35 PM, Skipper Seabold > wrote: > > On Tue, Jul 20, 2010 at 10:24 PM, Keith Goodman > wrote: > >> Good point. Looks like we can get rid of 2 copies! I didn't get rid of > >> the second copy but I did cut things do

Re: [Numpy-discussion] lstsq functionality

2010-07-21 Thread Keith Goodman
On Wed, Jul 21, 2010 at 4:35 PM, Skipper Seabold wrote: > On Tue, Jul 20, 2010 at 10:24 PM, Keith Goodman wrote: >> Good point. Looks like we can get rid of 2 copies! I didn't get rid of >> the second copy but I did cut things down just to see what the timing >> was like. I also threw out the abi

Re: [Numpy-discussion] lstsq functionality

2010-07-21 Thread Skipper Seabold
On Wed, Jul 21, 2010 at 7:25 PM, David Warde-Farley wrote: > On 2010-07-20, at 10:16 PM, Skipper Seabold wrote: > >> Out of curiosity, is there an explicit way to check if these share memory? > > > You could do the exact calculations (I think) but this isn't actually > implemented in NumPy, thoug

Re: [Numpy-discussion] lstsq functionality

2010-07-21 Thread Skipper Seabold
On Tue, Jul 20, 2010 at 10:24 PM, Keith Goodman wrote: > Good point. Looks like we can get rid of 2 copies! I didn't get rid of > the second copy but I did cut things down just to see what the timing > was like. I also threw out the ability to handle complex numbers (only > saves an if iscomplex s

Re: [Numpy-discussion] lstsq functionality

2010-07-21 Thread David Warde-Farley
On 2010-07-20, at 10:16 PM, Skipper Seabold wrote: > Out of curiosity, is there an explicit way to check if these share memory? You could do the exact calculations (I think) but this isn't actually implemented in NumPy, though np.may_share_memory is a conservative test for it that will err on

Re: [Numpy-discussion] lstsq functionality

2010-07-20 Thread Keith Goodman
On Tue, Jul 20, 2010 at 7:16 PM, Skipper Seabold wrote: > On Tue, Jul 20, 2010 at 10:12 PM, Keith Goodman wrote: >> On Tue, Jul 20, 2010 at 6:35 PM, Keith Goodman wrote: >>> On Mon, Jul 19, 2010 at 10:08 PM, Charles R Harris >>> wrote: On Mon, Jul 19, 2010 at 9:40 PM, Keith Goodm

Re: [Numpy-discussion] lstsq functionality

2010-07-20 Thread Skipper Seabold
On Tue, Jul 20, 2010 at 10:12 PM, Keith Goodman wrote: > On Tue, Jul 20, 2010 at 6:35 PM, Keith Goodman wrote: >> On Mon, Jul 19, 2010 at 10:08 PM, Charles R Harris >> wrote: >>> >>> >>> On Mon, Jul 19, 2010 at 9:40 PM, Keith Goodman wrote: On Mon, Jul 19, 2010 at 8:27 PM, Charles R H

Re: [Numpy-discussion] lstsq functionality

2010-07-20 Thread Keith Goodman
On Tue, Jul 20, 2010 at 6:35 PM, Keith Goodman wrote: > On Mon, Jul 19, 2010 at 10:08 PM, Charles R Harris > wrote: >> >> >> On Mon, Jul 19, 2010 at 9:40 PM, Keith Goodman wrote: >>> >>> On Mon, Jul 19, 2010 at 8:27 PM, Charles R Harris >>> wrote: >>> > >>> > >>> > On Mon, Jul 19, 2010 at 9:02

Re: [Numpy-discussion] lstsq functionality

2010-07-20 Thread Keith Goodman
On Mon, Jul 19, 2010 at 10:08 PM, Charles R Harris wrote: > > > On Mon, Jul 19, 2010 at 9:40 PM, Keith Goodman wrote: >> >> On Mon, Jul 19, 2010 at 8:27 PM, Charles R Harris >> wrote: >> > >> > >> > On Mon, Jul 19, 2010 at 9:02 PM, Keith Goodman >> > wrote: >> >> >> >> On Mon, Jul 19, 2010 at 6

Re: [Numpy-discussion] lstsq functionality

2010-07-20 Thread Skipper Seabold
On Tue, Jul 20, 2010 at 11:23 AM, Charles R Harris wrote: > > > On Tue, Jul 20, 2010 at 8:32 AM, Skipper Seabold > wrote: >> >> On Tue, Jul 20, 2010 at 1:08 AM, Charles R Harris >> wrote: >> > >> > >> > On Mon, Jul 19, 2010 at 9:40 PM, Keith Goodman >> > wrote: >> >> >> >> On Mon, Jul 19, 2010

Re: [Numpy-discussion] lstsq functionality

2010-07-20 Thread Charles R Harris
On Tue, Jul 20, 2010 at 8:32 AM, Skipper Seabold wrote: > On Tue, Jul 20, 2010 at 1:08 AM, Charles R Harris > wrote: > > > > > > On Mon, Jul 19, 2010 at 9:40 PM, Keith Goodman > wrote: > >> > >> On Mon, Jul 19, 2010 at 8:27 PM, Charles R Harris > >> wrote: > >> > > >> > > >> > On Mon, Jul 19, 2

Re: [Numpy-discussion] lstsq functionality

2010-07-20 Thread Skipper Seabold
On Tue, Jul 20, 2010 at 1:08 AM, Charles R Harris wrote: > > > On Mon, Jul 19, 2010 at 9:40 PM, Keith Goodman wrote: >> >> On Mon, Jul 19, 2010 at 8:27 PM, Charles R Harris >> wrote: >> > >> > >> > On Mon, Jul 19, 2010 at 9:02 PM, Keith Goodman >> > wrote: >> >> >> >> On Mon, Jul 19, 2010 at 6:

Re: [Numpy-discussion] lstsq functionality

2010-07-19 Thread Charles R Harris
On Mon, Jul 19, 2010 at 9:40 PM, Keith Goodman wrote: > On Mon, Jul 19, 2010 at 8:27 PM, Charles R Harris > wrote: > > > > > > On Mon, Jul 19, 2010 at 9:02 PM, Keith Goodman > wrote: > >> > >> On Mon, Jul 19, 2010 at 6:53 PM, Joshua Holbrook > >> wrote: > >> > On Mon, Jul 19, 2010 at 5:50 PM,

Re: [Numpy-discussion] lstsq functionality

2010-07-19 Thread Keith Goodman
On Mon, Jul 19, 2010 at 8:27 PM, Charles R Harris wrote: > > > On Mon, Jul 19, 2010 at 9:02 PM, Keith Goodman wrote: >> >> On Mon, Jul 19, 2010 at 6:53 PM, Joshua Holbrook >> wrote: >> > On Mon, Jul 19, 2010 at 5:50 PM, Charles R Harris >> > wrote: >> >> Hi All, >> >> >> >> I'm thinking about a

Re: [Numpy-discussion] lstsq functionality

2010-07-19 Thread Charles R Harris
On Mon, Jul 19, 2010 at 9:02 PM, Keith Goodman wrote: > On Mon, Jul 19, 2010 at 6:53 PM, Joshua Holbrook > wrote: > > On Mon, Jul 19, 2010 at 5:50 PM, Charles R Harris > > wrote: > >> Hi All, > >> > >> I'm thinking about adding some functionality to lstsq because I find > myself > >> doing the

Re: [Numpy-discussion] lstsq functionality

2010-07-19 Thread Charles R Harris
On Mon, Jul 19, 2010 at 9:02 PM, Keith Goodman wrote: > On Mon, Jul 19, 2010 at 6:53 PM, Joshua Holbrook > wrote: > > On Mon, Jul 19, 2010 at 5:50 PM, Charles R Harris > > wrote: > >> Hi All, > >> > >> I'm thinking about adding some functionality to lstsq because I find > myself > >> doing the

Re: [Numpy-discussion] lstsq functionality

2010-07-19 Thread Keith Goodman
On Mon, Jul 19, 2010 at 6:53 PM, Joshua Holbrook wrote: > On Mon, Jul 19, 2010 at 5:50 PM, Charles R Harris > wrote: >> Hi All, >> >> I'm thinking about adding some functionality to lstsq because I find myself >> doing the same fixes over and over. List follows. >> >> Add weights so data points c

Re: [Numpy-discussion] lstsq functionality

2010-07-19 Thread Joshua Holbrook
On Mon, Jul 19, 2010 at 5:50 PM, Charles R Harris wrote: > Hi All, > > I'm thinking about adding some functionality to lstsq because I find myself > doing the same fixes over and over. List follows. > > Add weights so data points can be weighted. > Use column scaling so condition numbers make more

[Numpy-discussion] lstsq functionality

2010-07-19 Thread Charles R Harris
Hi All, I'm thinking about adding some functionality to lstsq because I find myself doing the same fixes over and over. List follows. 1. Add weights so data points can be weighted. 2. Use column scaling so condition numbers make more sense. 3. Compute covariance approximation? Unfortun