You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@systemds.apache.org by GitBox <gi...@apache.org> on 2021/11/19 14:44:40 UTC

[GitHub] [systemds] OlgaOvcharenko commented on a change in pull request #1455: [SYSTEMDS-3203] Remove empty columns frame out of bounds

OlgaOvcharenko commented on a change in pull request #1455:
URL: https://github.com/apache/systemds/pull/1455#discussion_r753252265



##########
File path: src/main/java/org/apache/sysds/runtime/matrix/data/FrameBlock.java
##########
@@ -2533,7 +2539,8 @@ private FrameBlock removeEmptyRows(MatrixBlock select, boolean emptyReturn) {
 				isEmpty = isEmpty && (ArrayUtils.contains(new double[]{0.0, Double.NaN}, UtilFunctions.objectToDoubleSafe(type, colData.get(i))));
 			}
 
-			if((!isEmpty && select == null) || (select != null && select.getValue(i, 0) == 1)) {
+			double selectValue = select != null ? !selectColVector ? select.getValue(i, 0) : select.getValue( 0, i) : 0.0;
+			if(selectValue == 1.0 || (!isEmpty && select == null)) {

Review comment:
       I modified the implementation, now the indices are obtained and we iterate this list. 




-- 
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: dev-unsubscribe@systemds.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org