I'm trying to divide numpy array by numpy float64 type scalar. Following is my code.
pose_q = np.array(pose_q)
expectecd_q = np.array(expectecd_q)
pose_q = np.squeeze(pose_q)
expectecd_q = np.squeeze(expectecd_q)
q1 = expectecd_q / np.linalg.norm(expectecd_q)
q2 = pose_q / np.linalg.norm(pose_q)
d = abs(np.sum(np.multiply(q1, q2)))
However I'm getting the following error pointing towards expectecd_q / np.linalg.norm(expectecd_q)
TypeError: ufunc 'true_divide' not supported for the input types, and the inputs could not be safely coerced to any supported types according to the casting rule ''safe''