Rudolf Adamkovič Personal site


Explore: Default dtype of arange is native int or float

import numpy as np
a = np.arange(10, 50, 10)
(a.dtype, a.dtype == int)
(dtype('int64'), True)
import numpy as np
a = np.arange(0.1, 0.5, 0.1)
(a.dtype, a.dtype == float)
(dtype('float64'), True)

© 2025 Rudolf Adamkovič under GNU General Public License version 3.
Made with Emacs and secret alien technologies of yesteryear.