<h3 dir="auto">Describe the issue:</h3>
<p dir="auto">In the documentation, it is explained that "arange(stop): Values are generated within the half-open interval [0, stop) (in other words, the interval including start but excluding stop)" but in case of using e-4 order number as argument "stop", the return includes the number of "stop" at the end of array.<br>
For example,<br>
<code class="notranslate">print(np.arange(1e-5, 1e-4, 2e-6))</code><br>
returns<br>
<code class="notranslate">[1.0e-05 1.2e-05 1.4e-05 1.6e-05 1.8e-05 2.0e-05 2.2e-05 2.4e-05 2.6e-05 2.8e-05 3.0e-05 3.2e-05 3.4e-05 3.6e-05 3.8e-05 4.0e-05 4.2e-05 4.4e-05 4.6e-05 4.8e-05 5.0e-05 5.2e-05 5.4e-05 5.6e-05 5.8e-05 6.0e-05 6.2e-05 6.4e-05 6.6e-05 6.8e-05 7.0e-05 7.2e-05 7.4e-05 7.6e-05 7.8e-05 8.0e-05 8.2e-05 8.4e-05 8.6e-05 8.8e-05 9.0e-05 9.2e-05 9.4e-05 9.6e-05 9.8e-05 1.0e-04]</code><br>
But for some other cases which also use e-4 order number return correctly;<br>
<code class="notranslate">print(np.arange(1e-5, 3e-4, 2e-6))</code><br>
returns<br>
<code class="notranslate">[1.00e-05 1.20e-05 1.40e-05 1.60e-05 1.80e-05 2.00e-05 2.20e-05 2.40e-05 2.60e-05 2.80e-05 3.00e-05 3.20e-05 3.40e-05 3.60e-05 3.80e-05 4.00e-05 4.20e-05 4.40e-05 4.60e-05 4.80e-05 5.00e-05 5.20e-05 5.40e-05 5.60e-05 5.80e-05 6.00e-05 6.20e-05 6.40e-05 6.60e-05 6.80e-05 7.00e-05 7.20e-05 7.40e-05 7.60e-05 7.80e-05 8.00e-05 8.20e-05 8.40e-05 8.60e-05 8.80e-05 9.00e-05 9.20e-05 9.40e-05 9.60e-05 9.80e-05 1.00e-04 1.02e-04 1.04e-04 1.06e-04 1.08e-04 1.10e-04 1.12e-04 1.14e-04 1.16e-04 1.18e-04 1.20e-04 1.22e-04 1.24e-04 1.26e-04 1.28e-04 1.30e-04 1.32e-04 1.34e-04 1.36e-04 1.38e-04 1.40e-04 1.42e-04 1.44e-04 1.46e-04 1.48e-04 1.50e-04 1.52e-04 1.54e-04 1.56e-04 1.58e-04 1.60e-04 1.62e-04 1.64e-04 1.66e-04 1.68e-04 1.70e-04 1.72e-04 1.74e-04 1.76e-04 1.78e-04 1.80e-04 1.82e-04 1.84e-04 1.86e-04 1.88e-04 1.90e-04 1.92e-04 1.94e-04 1.96e-04 1.98e-04 2.00e-04 2.02e-04 2.04e-04 2.06e-04 2.08e-04 2.10e-04 2.12e-04 2.14e-04 2.16e-04 2.18e-04 2.20e-04 2.22e-04 2.24e-04 2.26e-04 2.28e-04 2.30e-04 2.32e-04 2.34e-04 2.36e-04 2.38e-04 2.40e-04 2.42e-04 2.44e-04 2.46e-04 2.48e-04 2.50e-04 2.52e-04 2.54e-04 2.56e-04 2.58e-04 2.60e-04 2.62e-04 2.64e-04 2.66e-04 2.68e-04 2.70e-04 2.72e-04 2.74e-04 2.76e-04 2.78e-04 2.80e-04 2.82e-04 2.84e-04 2.86e-04 2.88e-04 2.90e-04 2.92e-04 2.94e-04 2.96e-04 2.98e-04]</code></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
print(np.arange(1e-5, 1e-4, 2e-6))
print(np.arange(1e-5, 3e-4, 2e-6))"><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-en">print</span>(<span class="pl-s1">np</span>.<span class="pl-en">arange</span>(<span class="pl-c1">1e-5</span>, <span class="pl-c1">1e-4</span>, <span class="pl-c1">2e-6</span>))
<span class="pl-en">print</span>(<span class="pl-s1">np</span>.<span class="pl-en">arange</span>(<span class="pl-c1">1e-5</span>, <span class="pl-c1">3e-4</span>, <span class="pl-c1">2e-6</span>))</pre></div>
<h3 dir="auto">Error message:</h3>
<p dir="auto"><em>No response</em></p>
<h3 dir="auto">Runtime information:</h3>
<p dir="auto">1.24.2<br>
3.8.16 | packaged by conda-forge | (default, Feb  1 2023, 16:05:36)<br>
[Clang 14.0.6 ]</p>
<p dir="auto">[{'simd_extensions': {'baseline': ['SSE', 'SSE2', 'SSE3'],<br>
'found': ['SSSE3', 'SSE41', 'POPCNT', 'SSE42'],<br>
'not_found': ['AVX',<br>
'F16C',<br>
'FMA3',<br>
'AVX2',<br>
'AVX512F',<br>
'AVX512CD',<br>
'AVX512_KNL',<br>
'AVX512_SKX',<br>
'AVX512_CLX',<br>
'AVX512_CNL',<br>
'AVX512_ICL']}},<br>
{'architecture': 'Nehalem',<br>
'filepath': '/Users/uematsuryota/opt/anaconda3/envs/env_healpy/lib/libopenblasp-r0.3.21.dylib',<br>
'internal_api': 'openblas',<br>
'num_threads': 8,<br>
'prefix': 'libopenblas',<br>
'threading_layer': 'openmp',<br>
'user_api': 'blas',<br>
'version': '0.3.21'},<br>
{'filepath': '/Users/uematsuryota/opt/anaconda3/envs/env_healpy/lib/libomp.dylib',<br>
'internal_api': 'openmp',<br>
'num_threads': 8,<br>
'prefix': 'libomp',<br>
'user_api': 'openmp',<br>
'version': None}]<br>
None</p>
<h3 dir="auto">Context for the issue:</h3>
<p dir="auto">If we know this behavior before using we can treat that, but I haven't confirm for all other case causing same phenomenon and I guess certain amount of people are using this without knowing that.<br>
I had crosschecked with some colleagues.</p>
<p dir="auto"><em>Original ticket <a href="http://projects.scipy.org/numpy/ticket/1516" rel="nofollow">http://projects.scipy.org/numpy/ticket/1516</a> on 2010-06-20 by <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/tonysyu/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/tonysyu">@tonysyu</a>, assigned to unknown.</em></p>
<p dir="auto">When multiplying a numpy float and a python list, the float is cast as an int and then does the usual python thing (creates duplicates of the original sequence).</p>
<p dir="auto">For example,</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="&gt;&gt;&gt; np.float64(2.3) * [1, 2]
[1, 2, 1, 2]"><pre class="notranslate"><code class="notranslate">&gt;&gt;&gt; np.float64(2.3) * [1, 2]
[1, 2, 1, 2]
</code></pre></div>
<p dir="auto">Instead, the multiplication should either work like an array scalar:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="&gt;&gt;&gt; np.array(2.3) * [1, 2]
array([ 2.3,  4.6])"><pre class="notranslate"><code class="notranslate">&gt;&gt;&gt; np.array(2.3) * [1, 2]
array([ 2.3,  4.6])
</code></pre></div>
<p dir="auto">or throw an exception like a python float:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="&gt;&gt;&gt; 2.3 * [1, 2]
Traceback (most recent call last):
  File &quot;&lt;stdin&gt;&quot;, line 1, in &lt;module&gt;
TypeError: can't multiply sequence by non-int of type 'float'"><pre class="notranslate"><code class="notranslate">&gt;&gt;&gt; 2.3 * [1, 2]
Traceback (most recent call last):
  File "&lt;stdin&gt;", line 1, in &lt;module&gt;
TypeError: can't multiply sequence by non-int of type 'float'
</code></pre></div>