Issue 1:
Describe the issue:

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.

For example,

print(np.arange(1e-5, 1e-4, 2e-6))

returns

[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]

But for some other cases which also use e-4 order number return correctly;

print(np.arange(1e-5, 3e-4, 2e-6))

returns

[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]

Reproduce the code example:

import numpy as np
print(np.arange(1e-5, 1e-4, 2e-6))
print(np.arange(1e-5, 3e-4, 2e-6))

Error message:

No response

Runtime information:

1.24.2

3.8.16 | packaged by conda-forge | (default, Feb 1 2023, 16:05:36)

[Clang 14.0.6 ]

[{'simd_extensions': {'baseline': ['SSE', 'SSE2', 'SSE3'],

'found': ['SSSE3', 'SSE41', 'POPCNT', 'SSE42'],

'not_found': ['AVX',

'F16C',

'FMA3',

'AVX2',

'AVX512F',

'AVX512CD',

'AVX512_KNL',

'AVX512_SKX',

'AVX512_CLX',

'AVX512_CNL',

'AVX512_ICL']}},

{'architecture': 'Nehalem',

'filepath': '/Users/uematsuryota/opt/anaconda3/envs/env_healpy/lib/libopenblasp-r0.3.21.dylib',

'internal_api': 'openblas',

'num_threads': 8,

'prefix': 'libopenblas',

'threading_layer': 'openmp',

'user_api': 'blas',

'version': '0.3.21'},

{'filepath': '/Users/uematsuryota/opt/anaconda3/envs/env_healpy/lib/libomp.dylib',

'internal_api': 'openmp',

'num_threads': 8,

'prefix': 'libomp',

'user_api': 'openmp',

'version': None}]

None

Context for the issue:

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.

I had crosschecked with some colleagues.

Issue 2:
Original ticket http://projects.scipy.org/numpy/ticket/1516 on 2010-06-20 by @tonysyu, assigned to unknown.

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).

For example,

>>> np.float64(2.3) * [1, 2]
[1, 2, 1, 2]

Instead, the multiplication should either work like an array scalar:

>>> np.array(2.3) * [1, 2]
array([ 2.3, 4.6])

or throw an exception like a python float:

>>> 2.3 * [1, 2]
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: can't multiply sequence by non-int of type 'float'