Premium problem159. In-Place vs Out-of-Place Mixed dtypes

Hard Locked

Return (inplace_result, inplace_dtype_name, outofplace_result, outofplace_dtype_name):

  • copy a_int8, then add b_int16 into the copy in place
  • separately compute the ordinary out-of-place sum

Input

a_int8 = [100 100 100]
b_int16 = [100 100 100]

Output

(array([-56, -56, -56], dtype=int8), 'int8', array([200, 200, 200], dtype=int16), 'int16')

Premium problem

This one's part of Premium. Unlock the full NumPy track plus every other premium problem on the site.

Implement solve(...)