[Numpy-discussion] Response to PEP suggestions

konrad.hinsen at laposte.net konrad.hinsen at laposte.net
Fri Feb 18 08:00:14 CST 2005


On Feb 18, 2005, at 16:23, Robert Kern wrote:

> I'm sure there are any number of people who use len(x) as a way to 
> test the sequenceness of x. While it might be okay for rank-0 arrays, 
> extending this to builtin ints and floats may not be a good idea. I'm 
> pretty sure this would get rejected.

For arrays, len(x) == x.shape[0], so len(x) should fail for rank-0 
arrays anyway. As it does in Numeric.

Konrad.
--
---------------------------------------------------------------------
Konrad Hinsen
Laboratoire Léon Brillouin, CEA Saclay,
91191 Gif-sur-Yvette Cedex, France
Tel.: +33-1 69 08 79 25
Fax: +33-1 69 08 82 61
E-Mail: hinsen at llb.saclay.cea.fr
---------------------------------------------------------------------





More information about the Numpy-discussion mailing list