Is it possible to assign a variable to be a random vector. The only syntax I could find was rand.jumpahead but further research did not seem promising.


Thank you,

Suhail

What do you mean random vector? Is this a vector in a mathematical sense, or do you mean an array/list? Also, what's random about it? The entries?

Is it possible to assign a variable to be a random vector. The only syntax I could find was rand.jumpahead but further research did not seem promising.


Thank you,

Suhail

You should check the module numpy.random, which contains routines to generate random numpy arrays (convertible to python lists if you need it). See http://docs.scipy.org/doc/numpy/reference/routines.random.html

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.