Find all combination that sum to N with multiple lists
<p><strong>Given</strong>: </p>

<ul>
<li><code>m</code> number of lists (<code>m</code> can vary).</li>
<li>Each list contain <code>arange()</code> of numbers.</li>
</ul>

<p><strong>Want</strong>:</p>

<ul>
<li>Find the m-tuple (one number per list) that <code>sum()</code> to <code>N</code>.</li>
</ul>

<p><strong>What I have</strong>:</p>

<ul>
<li><p>I can find all combination in a static number of lists.</p>

<pre><code>import numpy as np
for a in np.arange(0,1,0.01):
    for b in np.arange(0,1,0.01):
        for c in np.arange(0,1,0.01):
            for d in np.arange(0,1,0.01):
                if (a+b+c+d) == 1.0: 
                    print a,b,c,d
</code></pre></li>
</ul>

<p>I would also like to find an optimal way to compute this as well.</p>