ramesesz commented on code in PR #1991:
URL: https://github.com/apache/systemds/pull/1991#discussion_r1468901002
##########
scripts/builtin/dist.dml:
##########
@@ -32,7 +32,8 @@
#
-----------------------------------------------------------------------------------------------
m_dist = function(Matrix[Double] X) return (Matrix[Double] Y) {
- G = X %*% t(X);
- Y = sqrt(-2 * G + outer(diag(G), t(diag(G)), "+"));
+ n = nrow(X)
+ s = rowSums(X^2)
+ Y = sqrt(-2 * X %*% t(X) + s + t(s))
Review Comment:
We already did a PR for the dist function, so is it better to revert the
changes of dist() for the current PR?
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]