<h3 dir="auto">Describe the issue:</h3>
<p dir="auto">When I try this, the result is of 8144 elements<br>
np.arange(0, 81.43, 0.01).shape<br>
(8144,)<br>
But, it should be 8143<br>
See the following counter example:<br>
np.arange(0, 81.45, 0.01).shape<br>
(8145,)<br>
np.arange(0, 81.44, 0.01).shape<br>
(8144,)<br>
np.arange(0, 11.44, 0.01).shape<br>
(1144,)</p>
<h3 dir="auto">Reproduce the code example:</h3>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import numpy as np
np.arange(0, 81.43, 0.01).shape

np.arange(0, 81.45, 0.01).shape

np.arange(0, 81.44, 0.01).shape

np.arange(0, 11.44, 0.01).shape"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s1">numpy</span> <span class="pl-k">as</span> <span class="pl-s1">np</span>
<span class="pl-s1">np</span>.<span class="pl-en">arange</span>(<span class="pl-c1">0</span>, <span class="pl-c1">81.43</span>, <span class="pl-c1">0.01</span>).<span class="pl-s1">shape</span>

<span class="pl-s1">np</span>.<span class="pl-en">arange</span>(<span class="pl-c1">0</span>, <span class="pl-c1">81.45</span>, <span class="pl-c1">0.01</span>).<span class="pl-s1">shape</span>

<span class="pl-s1">np</span>.<span class="pl-en">arange</span>(<span class="pl-c1">0</span>, <span class="pl-c1">81.44</span>, <span class="pl-c1">0.01</span>).<span class="pl-s1">shape</span>

<span class="pl-s1">np</span>.<span class="pl-en">arange</span>(<span class="pl-c1">0</span>, <span class="pl-c1">11.44</span>, <span class="pl-c1">0.01</span>).<span class="pl-s1">shape</span></pre></div>
<h3 dir="auto">Error message:</h3>
<p dir="auto"><em>No response</em></p>
<h3 dir="auto">NumPy/Python version information:</h3>
<p dir="auto">1.20.1 3.8.8 (default, Apr 13 2021, 19:58:26)<br>
[GCC 7.3.0]</p>
<p dir="auto">np.arange(begin, begin + n * spacing, spacing) should generate an array [begin, begin + spacing, begin + 2*spacing, ..., begin + (n-1) * spacing].</p>
<p dir="auto">However in the following example, it generated an array of size (n+1): [begin, begin + spacing, begin + 2*spacing, ..., begin + n * spacing].</p>
<p dir="auto">An epsilon is needed to generate the expected answer.<br>
np.arange(begin, begin + n*spacing -  epsilon, spacing)</p>
<h3 dir="auto">Reproducing code example:</h3>

<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import numpy as np
arr = np.arange(125.8,224.8,3)
print(arr)
epsilon = 1e-6
arr = np.arange(125.8,224.8-epsilon,3)
print(arr)"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s1">numpy</span> <span class="pl-k">as</span> <span class="pl-s1">np</span>
<span class="pl-s1">arr</span> <span class="pl-c1">=</span> <span class="pl-s1">np</span>.<span class="pl-en">arange</span>(<span class="pl-c1">125.8</span>,<span class="pl-c1">224.8</span>,<span class="pl-c1">3</span>)
<span class="pl-en">print</span>(<span class="pl-s1">arr</span>)
<span class="pl-s1">epsilon</span> <span class="pl-c1">=</span> <span class="pl-c1">1e-6</span>
<span class="pl-s1">arr</span> <span class="pl-c1">=</span> <span class="pl-s1">np</span>.<span class="pl-en">arange</span>(<span class="pl-c1">125.8</span>,<span class="pl-c1">224.8</span><span class="pl-c1">-</span><span class="pl-s1">epsilon</span>,<span class="pl-c1">3</span>)
<span class="pl-en">print</span>(<span class="pl-s1">arr</span>)</pre></div>
<h3 dir="auto">Error message:</h3>
<p dir="auto">arr = np.arange(125.8,224.8,3)<br>
print(arr)</p>
<p dir="auto">Out[13]:<br>
array([125.8, 128.8, 131.8, 134.8, 137.8, 140.8, 143.8, 146.8, 149.8,<br>
152.8, 155.8, 158.8, 161.8, 164.8, 167.8, 170.8, 173.8, 176.8,<br>
179.8, 182.8, 185.8, 188.8, 191.8, 194.8, 197.8, 200.8, 203.8,<br>
206.8, 209.8, 212.8, 215.8, 218.8, 221.8, 224.8])</p>
<p dir="auto">epsilon = 1e-6<br>
arr = np.arange(125.8,224.8-epsilon,3)<br>
print(arr)</p>
<p dir="auto">Out[16]:<br>
array([125.8, 128.8, 131.8, 134.8, 137.8, 140.8, 143.8, 146.8, 149.8,<br>
152.8, 155.8, 158.8, 161.8, 164.8, 167.8, 170.8, 173.8, 176.8,<br>
179.8, 182.8, 185.8, 188.8, 191.8, 194.8, 197.8, 200.8, 203.8,<br>
206.8, 209.8, 212.8, 215.8, 218.8, 221.8])</p>
<h3 dir="auto">NumPy/Python version information:</h3>
<p dir="auto">1.20.2 3.8.10 (default, May 19 2021, 13:12:57) [MSC v.1916 64 bit (AMD64)]</p>