[Numpy-discussion] conditional array indexing
Mon Feb 14 16:38:27 CST 2011
On Mon, Feb 14, 2011 at 16:39, Bryan Woods <email@example.com> wrote:
> Thanks for your reply. Unfortunately it is not working that simply.
> This tells me that "only integer arrays with one element can be converted to
> an index"
> roughness and landcover are identically shaped 2D arrays. z0_legend in a 1D
> look-up table. I assume the error here comes from trying to index a 1D array
> with a 2D array.
Make sure that z0_legend is a numpy array, not a list.
"I have come to believe that the whole world is an enigma, a harmless
enigma that is made terrible by our own mad attempt to interpret it as
though it had an underlying truth."
-- Umberto Eco
More information about the NumPy-Discussion