code: public SDVariable scalar(String name, DataType dataType, Number value) {
          try(MemoryWorkspace ws = Nd4j.getMemoryManager().scopeOutOfWorkspaces()) {
              return var(name, Nd4j.scalar(dataType, value));
          }
      }
docs: Create a new scalar (rank 0) SDVariable with the specified value and datatype
  
  @param name     Name of the SDVariable
  @param dataType Data type of the scalar
  @param value    Value to initialize the variable with
  @return SDVariable