yunfengzhou-hub commented on a change in pull request #70: URL: https://github.com/apache/flink-ml/pull/70#discussion_r835697293
########## File path: flink-ml-core/src/main/java/org/apache/flink/ml/common/distance/EuclideanDistanceMeasure.java ########## @@ -34,6 +35,7 @@ public static EuclideanDistanceMeasure getInstance() { @Override public double distance(Vector v1, Vector v2) { + Preconditions.checkArgument(v1.size() == v2.size()); double squaredDistance = 0.0; for (int i = 0; i < v1.size(); i++) { Review comment: I agree to improve it with BLAS but maybe in another PR. I'll leave a TODO here. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@flink.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org