[Numpy-discussion] "Advanced indexing" question - subset of data cube as a 2D array.
Wed Oct 29 11:11:43 CDT 2008
> In : bi = (f.bolo_indices[np.newaxis,:]+
> In : whc = (whscan[:,np.newaxis] + ones([1,107])).astype('int')
> In : array2d[whc,bi] = temp2d
> I thought this had worked, but the values didn't seem to be going to the right places when I re-examined them.
I think I answered my own question: if I'd used zeros() instead of
ones() it would have worked fine. I don't know why I tried to use
More information about the Numpy-discussion