<p dir="auto">I encounter a error output in using np,arange(), in python 3.5, numpy 1.13, windows 10 64 bit.</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="np.arange(0.24,0.34,0.02)
Out[43]: array([ 0.24,  0.26,  0.28,  0.3 ,  0.32,  0.34])

np.arange(0.24,0.36,0.02)
Out[44]: array([ 0.24,  0.26,  0.28,  0.3 ,  0.32,  0.34])

np.arange(0,0.16,0.02)
Out[45]: array([ 0.  ,  0.02,  0.04,  0.06,  0.08,  0.1 ,  0.12,  0.14])

np.arange(0,0.14,0.02)
Out[46]: array([ 0.  ,  0.02,  0.04,  0.06,  0.08,  0.1 ,  0.12,  0.14])

np.arange(0.24,0.32,0.02)
Out[51]: array([ 0.24,  0.26,  0.28,  0.3 ,  0.32])

np.__version__
Out[48]: '1.13.3'
"><pre class="notranslate"><span class="pl-s1">np</span>.<span class="pl-en">arange</span>(<span class="pl-c1">0.24</span>,<span class="pl-c1">0.34</span>,<span class="pl-c1">0.02</span>)
<span class="pl-v">Out</span>[<span class="pl-c1">43</span>]: <span class="pl-en">array</span>([ <span class="pl-c1">0.24</span>,  <span class="pl-c1">0.26</span>,  <span class="pl-c1">0.28</span>,  <span class="pl-c1">0.3</span> ,  <span class="pl-c1">0.32</span>,  <span class="pl-c1">0.34</span>])

<span class="pl-s1">np</span>.<span class="pl-en">arange</span>(<span class="pl-c1">0.24</span>,<span class="pl-c1">0.36</span>,<span class="pl-c1">0.02</span>)
<span class="pl-v">Out</span>[<span class="pl-c1">44</span>]: <span class="pl-en">array</span>([ <span class="pl-c1">0.24</span>,  <span class="pl-c1">0.26</span>,  <span class="pl-c1">0.28</span>,  <span class="pl-c1">0.3</span> ,  <span class="pl-c1">0.32</span>,  <span class="pl-c1">0.34</span>])

<span class="pl-s1">np</span>.<span class="pl-en">arange</span>(<span class="pl-c1">0</span>,<span class="pl-c1">0.16</span>,<span class="pl-c1">0.02</span>)
<span class="pl-v">Out</span>[<span class="pl-c1">45</span>]: <span class="pl-en">array</span>([ <span class="pl-c1">0.</span>  ,  <span class="pl-c1">0.02</span>,  <span class="pl-c1">0.04</span>,  <span class="pl-c1">0.06</span>,  <span class="pl-c1">0.08</span>,  <span class="pl-c1">0.1</span> ,  <span class="pl-c1">0.12</span>,  <span class="pl-c1">0.14</span>])

<span class="pl-s1">np</span>.<span class="pl-en">arange</span>(<span class="pl-c1">0</span>,<span class="pl-c1">0.14</span>,<span class="pl-c1">0.02</span>)
<span class="pl-v">Out</span>[<span class="pl-c1">46</span>]: <span class="pl-en">array</span>([ <span class="pl-c1">0.</span>  ,  <span class="pl-c1">0.02</span>,  <span class="pl-c1">0.04</span>,  <span class="pl-c1">0.06</span>,  <span class="pl-c1">0.08</span>,  <span class="pl-c1">0.1</span> ,  <span class="pl-c1">0.12</span>,  <span class="pl-c1">0.14</span>])

<span class="pl-s1">np</span>.<span class="pl-en">arange</span>(<span class="pl-c1">0.24</span>,<span class="pl-c1">0.32</span>,<span class="pl-c1">0.02</span>)
<span class="pl-v">Out</span>[<span class="pl-c1">51</span>]: <span class="pl-en">array</span>([ <span class="pl-c1">0.24</span>,  <span class="pl-c1">0.26</span>,  <span class="pl-c1">0.28</span>,  <span class="pl-c1">0.3</span> ,  <span class="pl-c1">0.32</span>])

<span class="pl-s1">np</span>.<span class="pl-s1">__version__</span>
<span class="pl-v">Out</span>[<span class="pl-c1">48</span>]: <span class="pl-s">'1.13.3'</span></pre></div>
<p dir="auto">If I do <code class="notranslate">np.arange(3.18,3.21,0.01)</code>, it gives <code class="notranslate">array([ 3.18,  3.19,  3.2 ])</code>. However, if I do <code class="notranslate">np.arange(3.18,3.22,0.01)</code>, it gives <code class="notranslate">array([ 3.18,  3.19,  3.2 ,  3.21,  3.22])</code>. This seems inconsistent. Why is this so? I am using numpy 1.11.2 on Python 2.7.13.</p>