nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/factory/BaseNDArrayFactory.java
@Override
    public INDArray scalar(double value) {
        if (Nd4j.dataType() == DataBuffer.Type.DOUBLE)
            return create(new double[] {value}, new int[] {1, 1}, new int[] {1, 1}, 0);
        else
            return scalar((float) value);
    }
@Override
    public INDArray scalar(double value) {
        if (Nd4j.dataType() == DataBuffer.Type.DOUBLE)
            return create(new double[] {value}, new int[] {1, 1}, new int[] {1, 1}, 0);
        else
            return scalar((float) value);
    }
@ Override public INDArray scalar ( double value ) { if ( Nd4j . dataType ( ) == DataBuffer . Type . DOUBLE ) return create ( new double [ ] { value } , new int [ ] { 1 , 1 } , new int [ ] { 1 , 1 } , 0 ) ; else return scalar ( ( float ) value ) ; }
Create a scalar nd array with the specified value and offset

@param value the value of the scalar
@return the scalar nd array
Create a scalar nd array with the specified value and offset