Armin Moser wrote: > Sebastian Busch wrote: >> ... >> array([list(a[i,:i])+list(b[i,i:]) for i in range(a.shape[0])]) > It seems that I did not understand what you tried to reach. > ...
Sorry. I wanted to do the same as Matthias -- taking his example: ===== from scipy import ones, array matrix1 = ones((4,4)) matrix2 = 2*ones((4,4)) matrix3 = array([list(matrix1[i,:i])+list(matrix2[i,i:])\ for i in range(matrix1.shape[0])]) ===== yields matrix3 array([[ 2., 2., 2., 2.], [ 1., 2., 2., 2.], [ 1., 1., 2., 2.], [ 1., 1., 1., 2.]]) it's quite the same, you just have to type less :) best, sebastian.
signature.asc
Description: OpenPGP digital signature
------------------------------------------------------------------------------ The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your production scanning environment may not be a perfect world - but thanks to Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700 Series Scanner you'll get full speed at 300 dpi even with all image processing features enabled. http://p.sf.net/sfu/kodak-com
_______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users