AdityaPandey2612 commented on code in PR #2529:
URL: https://github.com/apache/systemds/pull/2529#discussion_r3518471088
##########
src/main/java/org/apache/sysds/runtime/functionobjects/COV.java:
##########
@@ -63,6 +63,8 @@ private COV() {
public Data execute(Data in1, double u, double v, double w2)
{
CmCovObject cov1=(CmCovObject) in1;
+ if(w2 == 0)
+ return cov1;
Review Comment:
its a reliability case where during the weighted mean computation, if its a
sparse matrix, we run into the divide by zero error but a zero weight has no
impact on the original aggregation so I just returned the original covariance
itself.
--
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]