Re: LU decomposition

2015-11-04 Thread Nagy László Zsolt
> Hey, > > I have to write a LU-decomposition. My Code worked so far but (I want to > become better:) ) I want to ask you, if I could write this LU-decomposition > in a better way? Why can't you just use scipy for this? http://docs.scipy.org/doc/scipy-0.14.0/reference/generated/scipy.linalg.lu.

Re: LU decomposition

2015-11-03 Thread Oscar Benjamin
On 1 November 2015 at 10:04, gers antifx wrote: > > I have to write a LU-decomposition. My Code worked so far but (I want to > become better:) ) I want to ask you, if I could write this LU-decomposition > in a better way? > > def LU(x): > L = np.eye((x.shape[0])) > n = x.shape[0] > f

Re: LU decomposition

2015-11-01 Thread Peter Otten
gers antifx wrote: > I have to write a LU-decomposition. My Code worked so far but (I want to > become better:) ) I want to ask you, if I could write this > LU-decomposition in a better way? > > def LU(x): > L = np.eye((x.shape[0])) > n = x.shape[0] > for ii in range(n-1): > f

Re: LU decomposition

2015-11-01 Thread Chris Angelico
On Sun, Nov 1, 2015 at 9:04 PM, gers antifx wrote: > I have to write a LU-decomposition. My Code worked so far but (I want to > become better:) ) I want to ask you, if I could write this LU-decomposition > in a better way? > > def LU(x): > L = np.eye((x.shape[0])) > n = x.shape[0] >