[Numpy-discussion] assigning to submatrix

Perry Greenfield perry at stsci.edu
Tue Jul 29 13:25:02 EDT 2003


> # produce all possible combinations of rind and cind as
> # indices into an equivalent flattened for a
> indices = add.outer(rind*a.shape[1],cind).flat
> put(a, indices, b.flat)
> 
Whoops! I suppose that should be:

put(a.flat, indices, b.flat)




More information about the NumPy-Discussion mailing list