[Numpy-discussion] numpy.random.permutation bug?

Keith Goodman kwgoodman at gmail.com
Thu Jan 18 11:37:42 CST 2007


On 1/18/07, Robert Kern <robert.kern at gmail.com> wrote:
> Keith Goodman wrote:
> > I don't think that bug is particular to int32. For example:
> >
> >>> numpy.random.permutation(1.2)
> > TypeError: len() of unsized object
>
> Well, that should raise an error, though maybe not that error.

Is my example any different than the one given by Emanuele? He passed
in a.sum().

>> numpy.random.permutation(1)
array([0])
>> numpy.random.permutation(1.2)
TypeError: len() of unsized object


More information about the Numpy-discussion mailing list