Sample weight invariance tests check for almost equal

- Replace sample weight invariance tests to check for
  almost equal instead of equal