[Numpy-discussion] assigning to submatrix

Perry Greenfield perry at stsci.edu
Tue Jul 29 13:25:02 CDT 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