Re: [Numpy-discussion] possible bug in seed argument

2006-07-28 Thread Travis Oliphant
Travis Oliphant wrote: > I can verify that this now works with numpy 1.0b1 on Python 2.3. The > change was using an updated Pyrex for generating mtrand.c (it no longer > calls PyLong_AsUnsignedLong on integer objects as it did before). > > Scratch that. I meant it works with latest numpy (w

Re: [Numpy-discussion] possible bug in seed argument

2006-07-28 Thread Travis Oliphant
Gary Ruben wrote: > See below: > > Robert Kern wrote: > >> Gary Ruben wrote: >> >>> Should >>> >>> seed(1) >>> act the same as >>> >>> seed(array([1])) >>> in the random module? >>> >> No. They use slightly different mechanisms to seed. The integer uses >> RandomKit's >> seeding

Re: [Numpy-discussion] possible bug in seed argument

2006-07-28 Thread Travis Oliphant
Gary Ruben wrote: > See below: > > Robert Kern wrote: > >> Gary Ruben wrote: >> >>> Should >>> >>> seed(1) >>> act the same as >>> >>> seed(array([1])) >>> in the random module? >>> >> No. They use slightly different mechanisms to seed. The integer uses >> RandomKit's >> seeding

Re: [Numpy-discussion] possible bug in seed argument

2006-07-28 Thread Gary Ruben
See below: Robert Kern wrote: > Gary Ruben wrote: >> Should >> >>> seed(1) >> act the same as >> >>> seed(array([1])) >> in the random module? > > No. They use slightly different mechanisms to seed. The integer uses > RandomKit's > seeding routine. I borrowed Python's mechanism for seeding fr

Re: [Numpy-discussion] possible bug in seed argument

2006-07-27 Thread Robert Kern
Gary Ruben wrote: > Should > >>> seed(1) > act the same as > >>> seed(array([1])) > in the random module? No. They use slightly different mechanisms to seed. The integer uses RandomKit's seeding routine. I borrowed Python's mechanism for seeding from an array of integers. Now that it comes up