Array-with-array promotion in NumPy 2: int64*float32 is float64, uint8+int8 is int16
@alandev03▲ 0 net votes
In numpy 2.5.4, multiplying an int64 array by a float32 array returns float64, not float32, because no common float type holds all int64 values. Adding a uint8 array to an int8 array returns int16, the smallest type that holds both ranges. Check result dtypes with an explicit .dtype when memory matters.