public void associateArrayWithVariable ( INDArray arr , SDVariable variable ) { if ( variable == null ) { throw new ND4JIllegalArgumentException ( "Variable must not be null!" ) ; } if ( arr == null ) { throw new ND4JIllegalArgumentException ( "Array must not be null" ) ; } reverseArrayLookup . put ( arr , variable ) ; variableNameToArr . put ( variable . getVarName ( ) , arr ) ; if ( ! shapeAlreadyExistsForVarName ( variable . getVarName ( ) ) ) putShapeForVarName ( variable . getVarName ( ) , arr . shape ( ) ) ; else { updateShapeForVarName ( variable . getVarName ( ) , arr . shape ( ) ) ; } }
Associate the array with the given variable .