Re: [Numpy-discussion] any better way to normalise a matrix

2007-12-27 Thread [EMAIL PROTECTED]
> try starting with the tutorial: > http://www.scipy.org/Tentative_NumPy_Tutorial > > For example, to extract an array containing the maxima of each row of > mymatrix, you can use the amax() function: > > temp = numpy.amax(mymatrix, axis=1) > > thanx..had a tuff time finding the functions..will

Re: [Numpy-discussion] any better way to normalise a matrix

2007-12-27 Thread Anne Archibald
On 27/12/2007, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > in my code i am trying to normalise a matrix as below > > mymatrix=matrix(..# items are of double type..can be negative > values) > numrows,numcols=mymatrix.shape > > for i in range(numrows): > temp=mymatrix[i].max() >

[Numpy-discussion] any better way to normalise a matrix

2007-12-27 Thread [EMAIL PROTECTED]
in my code i am trying to normalise a matrix as below mymatrix=matrix(..# items are of double type..can be negative values) numrows,numcols=mymatrix.shape for i in range(numrows): temp=mymatrix[i].max() for j in range(numcols): mymatrix[i,j]=abs(mymatrix[i,j]/t