What do these lines of code do?
<p>I am working with <code>numpy</code>. I encountered this line of code. </p>

<pre><code>a = (1.,80.,5.)
</code></pre>

<p>What does this mean? At some other line, I found</p>

<pre><code>aList = np.arange(a[0], a[1]+a[2], a[2])
</code></pre>

<p><strong>Note:</strong> <code>np</code> is namespace assigned from <code>numpy</code>.</p>

<p>For the first code segment you are creating a tuple with 3 numbers 1, 80 and 5 in this. </p>

<pre><code>a=(1.,80.,5.)
1.0, 80.0, 5.0)
</code></pre>

<p>In the second code segment you are arranging a list with evenly spaced values from 1 to 81 (because you are adding a<a href="http://docs.scipy.org/doc/numpy/reference/generated/numpy.arange.html" rel="nofollow">1</a> and a<a href="http://stackoverflow.com/questions/626759/whats-the-difference-between-list-and-tuples">2</a>) with intevals of 5. </p>

<pre><code>np.arange(a[0], a[1]+a[2], a[2]) 
array([  1.,   6.,  11.,  16.,  21.,  26.,  31.,  36.,  41.,  46.,  51.,
        56.,  61.,  66.,  71.,  76.,  81.])
</code></pre>

<p>From the <a href="http://docs.scipy.org/doc/numpy/reference/generated/numpy.arange.html" rel="nofollow">numpy help</a></p>

<blockquote>
  <p><strong>numpy.arange</strong> ([start, ]stop, [step, ]dtype=None)</p>
  
  <p>Return evenly spaced values within a given interval.</p>
  
  <p>Values are generated within the half-open interval [start, stop) (in other words, the interval including start but excluding stop). For integer arguments the function is equivalent to the Python built-in range function, but returns an ndarray rather than a list.</p>
</blockquote>

<p><strong>EDIT</strong> As a.smiet pointed out the code creates a tuple and not a list. There are differences between the two as pointed out <a href="http://stackoverflow.com/questions/626759/whats-the-difference-between-list-and-tuples">here</a></p>

python numpy