[Numpy-discussion] lstsq functionality
Charles R Harris
Wed Jul 21 22:24:45 CDT 2010
On Wed, Jul 21, 2010 at 5:44 PM, Keith Goodman <email@example.com> wrote:
> On Wed, Jul 21, 2010 at 4:35 PM, Skipper Seabold <firstname.lastname@example.org>
> > On Tue, Jul 20, 2010 at 10:24 PM, Keith Goodman <email@example.com>
> >> 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 statement):
> > Just for timing purposes though right?
> Can someone confirm that the copy in np.linalg.lstsq
> bstar[:b.shape,:n_rhs] = b.copy()
> is not needed? I'm assuming that ndarray.__setitem__ never gives a
> view of the right-hand side.
bstar doesn't share memory with b, so there is no need for a copy. The whole
first part of lstsq could use a cleanup, there are a lot of other things
that could be made cleaner and some other bits that don't look right. Anyone
want to take a shot at it?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the NumPy-Discussion