<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def center_of_mass(X, Y):
 """Get center of mass Parameters X: 1d array X values Y: 1d array Y values Returns ------- res: number The position of the center of mass in X Notes ----- Uses least squares """

    X = np.asarray(X)
    Y = np.asarray(Y)
    return (X * Y).sum() / Y.sum()