def rand(*args):
import random<EOL>from numpy.core import zeros, float64<EOL>results = zeros(args, float64)<EOL>f = results.flat<EOL>for i in range(len(f)):<EOL><INDENT>f[i] = random.random()<EOL><DEDENT>return results<EOL>
Returns an array of random numbers with the given shape.

    This only uses the standard library, so it is useful for testing purposes.