[Numpy-discussion] Docstring improvements for numpy.where?

Robert Kern robert.kern@gmail....
Thu Sep 13 00:44:35 CDT 2007


Christopher Barker wrote:
> Yes, the docs could be clearer (and thanks Ann, that's better), but I'm 
> not sure that's the core problem....
> 
>> +    If x and y are not given, condition.nonzero() is returned. This has 
>> +    the effect of returning a tuple suitable for fancy indexing.
> 
> Why is this a special case of where? This just seems weird to me. 

It was introduced in numarray. I don't know why.

> Shouldn't that live somewhere else?

And it does: nonzero().

-- 
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