Github user yu-iskw commented on the pull request: https://github.com/apache/spark/pull/1964#issuecomment-53351219 Hi @erikerlandson, I appriciate your example code. I only use abs(v.toArray) in ChebyshevDistanceMetric. But i didn't change in WeightedChebyshevDistanceMetric. Because it can not modify in terms of negative weight(s). ``` - val diff = (v1 - v2).map(elm => Math.abs(elm)).:*(weights) + val diff = abs((v1 - v2).toArray) .:*(weights) // can not compile + val diff = abs(weights.:*(v1 - v2)) // fault result if weights has negative value ```
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org