On 1/18/07, Keith Goodman <[EMAIL PROTECTED]> wrote: > On 1/18/07, Robert Kern <[EMAIL PROTECTED]> wrote: > > Yes. 1.2 is not an integer. In Emanuele's example, a.sum() was an integer, > > though not an int. > > Sorry, but I'm still confused. Does that mean that this is the > expected behaviour? > > >> numpy.random.permutation(1) > array([0]) > > whereas > > >> numpy.random.permutation(1.2) > > should raise an error?
Crap. I should have read the doc string: Type: builtin_function_or_method Base Class: <type 'builtin_function_or_method'> String Form: <built-in method permutation of mtrand.RandomState object at 0xb77abbb4> Namespace: Interactive Docstring: Given an integer, return a shuffled sequence of integers >= 0 and < x; given a sequence, return a shuffled array copy. permutation(x) _______________________________________________ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion