This is an automated email from the ASF dual-hosted git repository.

baunsgaard pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/systemds.git


The following commit(s) were added to refs/heads/main by this push:
     new 849ab27ed0 [MINOR] Remove debug in VariableCPInstruction
849ab27ed0 is described below

commit 849ab27ed065ad839151a7c7f479466189f84896
Author: Sebastian Baunsgaard <[email protected]>
AuthorDate: Wed Aug 28 14:18:32 2024 +0200

    [MINOR] Remove debug in VariableCPInstruction
---
 .../sysds/runtime/instructions/cp/VariableCPInstruction.java     | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git 
a/src/main/java/org/apache/sysds/runtime/instructions/cp/VariableCPInstruction.java
 
b/src/main/java/org/apache/sysds/runtime/instructions/cp/VariableCPInstruction.java
index cf05806481..dcbdcc433f 100644
--- 
a/src/main/java/org/apache/sysds/runtime/instructions/cp/VariableCPInstruction.java
+++ 
b/src/main/java/org/apache/sysds/runtime/instructions/cp/VariableCPInstruction.java
@@ -352,7 +352,6 @@ public class VariableCPInstruction extends CPInstruction 
implements LineageTrace
                                throw new DMLRuntimeException("Invalid number 
of operands in write instruction: " + str);
                }
                else if(voc == VariableOperationCode.CastAsFrameVariable){
-                       // LOG.error(parts);
                        InstructionUtils.checkNumFields(parts, 3, 4, 5);
                }
                else {
@@ -866,8 +865,8 @@ public class VariableCPInstruction extends CPInstruction 
implements LineageTrace
                        case MATRIX: {
                                MatrixBlock mBlock = 
ec.getMatrixInput(getInput1().getName());
                                if( mBlock.getNumRows()!=1 || 
mBlock.getNumColumns()!=1 )
-                                       throw new 
DMLRuntimeException("Dimension mismatch - unable to cast matrix 
'"+getInput1().getName()+"' of dimension ("+mBlock.getNumRows()+" x 
"+mBlock.getNumColumns()+") to scalar. " + mBlock);
-                               double value = mBlock.get(0,0);
+                                       throw new 
DMLRuntimeException("Dimension mismatch - unable to cast matrix 
'"+getInput1().getName()+"' of dimension ("+mBlock.getNumRows()+" x 
"+mBlock.getNumColumns()+") to scalar. ");
+                               double value = mBlock.get(0, 0);
                                ec.releaseMatrixInput(getInput1().getName());
                                ec.setScalarOutput(output.getName(), new 
DoubleObject(value));
                                break;
@@ -991,10 +990,8 @@ public class VariableCPInstruction extends CPInstruction 
implements LineageTrace
                        ListObject colNames = 
(ListObject)ec.getVariable(getInput2().getName());
                        String[] names = new String[out.getNumColumns()];
                        List<Data> dat = colNames.getData();
-                       LOG.error(dat);
-                       for(int i = 0; i < out.getNumColumns();i++){
+                       for(int i = 0; i < out.getNumColumns();i++)
                                names[i] = 
((StringObject)dat.get(i)).getStringValue();
-                       }
                        out.setColumnNames(names);
                }
        }

Reply via email to