NumPy - Array Operations
You have two arrays:
You want to add them and keep the result as
arr_int = np.array([1000, 2000], dtype=np.int16) arr_float = np.array([0.1, 0.2], dtype=np.float32)
You want to add them and keep the result as
float32 to save memory. Which code correctly achieves this with type promotion?