On 9/25/2013 3:06 AM, Edmondo Porcu wrote: > advice on how to create a matrix with certain characteristics : > - Every entry should be minimum 0 maximum 1 with a step of 0.1 (legal > values are 0,0.1,0.2,0.3 etc) > - The number of columns of the matrix is a parameter of this matrix creation > algorithm > - Only the rows where the sum is 1 must be kept
This is not nearly enough information. But since it is all you offer, here is an answer for a square matrix with parameter n: np.identity(n) Alan Isaac _______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion