Element-wise seed for random Numpy arrays
<p>I'm trying to generate potentially large arrays of float (0.0-1.0), but have each element driven by a seed array, comprised of integers, which represent an id. </p>

<p>For example, I if have these two arrays:</p>

<pre><code>seedArray1 = np.array([0, 1, 2, 3, 4, 5, 6, 7, 8, 9])
seedArray2 = np.array([0, 1, 2, 3, 4, 5])
</code></pre>

<p>I'd like to be able to use those arrays as seed, but where an element is the same in both arrays (regardless of the shape of the length of the array, or where that id happens to occur in the array), it should generate the same float, like this: </p>

<pre><code>[ 0.5488135 0.417022 0.4359949 0.5507979 0.96702984 0.22199317 0.89286015 0.07630829 0.8734294 0.01037415]
[ 0.5488135 0.417022 0.4359949 0.5507979 0.96702984 0.22199317]
</code></pre>

<p>However, when I try to set the random seed of numpy.random, I get different results:</p>

<pre><code>import numpy as np

x1 = np.arange(10)
x2 = np.arange(6)

np.random.seed(x1)
print np.random.rand(x1.shape[0])

np.random.seed(x2)
print np.random.rand(x2.shape[0])
</code></pre>

<p>Which prints:</p>

<pre><code>[ 0.41060638  0.23192123  0.91382737  0.02916066  0.91437242  0.51045425 0.26140116  0.16574922  0.08861477  0.31908955]
[ 0.52500897  0.98236732  0.99371835  0.14121932  0.66945133  0.24223304]
</code></pre>

<p>Is there a way to generate random numpy arrays, using each element as the seed, and still leverages numpy's speed?</p>