[Numpy-discussion] conditional array indexing
Robert Kern
robert.kern at gmail.com
Mon Feb 14 17:38:27 EST 2011
On Mon, Feb 14, 2011 at 16:39, Bryan Woods <bwoods at aer.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.
--
Robert Kern
"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
mailing list