From: Paul F. D. <pa...@pf...> - 2001-11-11 17:13:24
|
Your reference to random is not fully qualified so I suppose you could be picking up some other random. But I just tried RandomArray.random((2,3)) and it worked fine. BTW you could just do 2.0*random((n,m))-1.0. -----Original Message----- From: num...@li... [mailto:num...@li...] On Behalf Of Nils Wagner Sent: Sunday, November 11, 2001 8:34 AM To: num...@li... Subject: [Numpy-discussion] RandomArray - random Hi, I tried to produce a random matrix say Q (2ndof \times nsamp+1) with Numpy 20.2 and Python 2.1.1 (#1, Sep 24 2001, 05:28:47) [GCC 2.95.3 20010315 (SuSE)] on linux2 Type "copyright", "credits" or "license" for more information. Traceback (most recent call last): File "modal.py", line 192, in ? Q = 2.0*random((2*ndof,nsamp+1))-ones((2*ndof,nsamp+1)) TypeError: random() takes exactly 1 argument (2 given) Does it require a new syntax to obtain a matrix consisting of uniformly distributed random numbers in the range +/- 1 ? Nils _______________________________________________ Numpy-discussion mailing list Num...@li... https://lists.sourceforge.net/lists/listinfo/numpy-discussion |