[Numpy-discussion] RandomArray - random

Nils Wagner nwagner at mecha.uni-stuttgart.de
Sun Nov 11 07:32:03 CST 2001


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




More information about the Numpy-discussion mailing list