Scalar addition: {@code out = this + scalar}<br>
Output variable has the same shape as the input variable

@param varName Output variable name
@param scalar  Scalar for operation
@return Output variable
979987
public SDVariable add(String varName, double scalar) {
        val function = sameDiff.f().add(this,scalar);
        return sameDiff.updateVariableNameAndReference(function,varName);
    }
788049
public SDVariable dot(String name, SDVariable x, SDVariable y, int... dimensions) {
        SDValidation.validateNumerical("dot", x, y);
        SDVariable ret = f().dot(x, y, dimensions);
        return updateVariableNameAndReference(ret, name);
    }
787554
public SDVariable shape(String name, SDVariable input) {
        SDVariable ret = f().shape(input);
        return updateVariableNameAndReference(ret, name);
    }
868744
public Vector add(double value) {
        VectorIterator it = iterator();
        Vector result = blank();

        while (it.hasNext()) {
            double x = it.next();
            int i = it.index();
            result.set(i, x + value);
        }

        return result;
    }
98084
public SDVariable transpose(String name, SDVariable x) {
        SDVariable result = f().transpose(x);
        return updateVariableNameAndReference(result, name);
    }
367809
@Nonnull
  public EChange removeVariable (@Nullable final String sName)
  {
    if (sName == null)
      return EChange.UNCHANGED;
    return m_aMap.removeObject (sName);
  }
1043840
public SDVariable scalar(String name, DataType dataType, Number value) {
        try(MemoryWorkspace ws = Nd4j.getMemoryManager().scopeOutOfWorkspaces()) {
            return var(name, Nd4j.scalar(dataType, value));
        }
    }
366605
public String createNewVariableOnSolver(final String prefix) {
        final int index = this.name2idx.size() + 1;
        final String varName = prefix + "_" + index;
        this.name2idx.put(varName, index);
        this.idx2name.put(index, varName);
        return varName;
    }
986488
public SDVariable scalarFloorMod(SDVariable in, Number value) {
        return scalarFloorMod(null, in, value);
    }
780427
public JsCodeBuilder popOutputVar() {
    outputVars.pop();
    OutputVar top = outputVars.peek();  // null if outputVars is now empty
    if (top != null) {
      currOutputVar = top.name;
      currOutputVarIsInited = top.initialized;
    } else {
      currOutputVar = null;
      currOutputVarIsInited = false;
    }
    return this;
  }
1060011
public Vector3d div(double scalar, Vector3d dest) {
        double inv = 1.0 / scalar;
        dest.x = x * inv;
        dest.y = y * inv;
        dest.z = z * inv;
        return dest;
    }
1373726
public Map<String, String> results(OutputVariable outputVariable) {
        return results(outputVariable, TimeUnit.NanoSeconds);
    }
803238
public static ManagerFunctions.InputN createMultTransA() {
        return (inputs, manager) -> {
            if( inputs.size() != 2 )
                throw new RuntimeException("Two inputs required");

            final Variable varA = inputs.get(0);
            final Variable varB = inputs.get(1);

            Operation.Info ret = new Operation.Info();

            if( varA instanceof VariableMatrix && varB instanceof VariableMatrix ) {

                // The output matrix or scalar variable must be created with the provided manager
                final VariableMatrix output = manager.createMatrix();
                ret.output = output;
                ret.op = new Operation("multTransA-mm") {
                    @Override
                    public void process() {
                        DMatrixRMaj mA = ((VariableMatrix)varA).matrix;
                        DMatrixRMaj mB = ((VariableMatrix)varB).matrix;

                        CommonOps_DDRM.multTransA(mA,mB,output.matrix);
                    }
                };
            } else {
                throw new IllegalArgumentException("Expected both inputs to be a matrix");
            }

            return ret;
        };
    }
266015
def add_scalar(self, name, value, step):
        """"""
        self.writer.add_scalar(name, value, step)
223498
public FFmpegOutputBuilder addOutput(String filename) {
    FFmpegOutputBuilder output = new FFmpegOutputBuilder(this, filename);
    outputs.add(output);
    return output;
  }
1309976
@Override
  public ServerEvaluationCall addVariableAs(String name, Object value) {
    if (value == null) return this;

    Class<?> as = value.getClass();
    AbstractWriteHandle writeHandle = null;
    if (AbstractWriteHandle.class.isAssignableFrom(as)) {
      writeHandle = (AbstractWriteHandle) value;
    } else {
      ContentHandle<?> contentHandle = handleRegistry.makeHandle(as);
      Utilities.setHandleContent(contentHandle, value);
      writeHandle = contentHandle;
    }
    return addVariable(name, writeHandle);
  }
1292893
public Context merge(final Map<String, Object> vars, final OutputStream outputStream) {
        return merge(Vars.of(vars), new OutputStreamOut(outputStream, engine));
    }