Premium problem58. Subtract Row Means

Medium Locked

Subtract the mean of each row from matrix X (keep dimensions). Return the result.

Input

[[1. 2. 3.]
 [4. 6. 8.]]

Output

[[-1.  0.  1.]
 [-2.  0.  2.]]

Premium problem

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

Implement solve(...)