@ Override public INDArray scalar ( Number value , long offset ) { if ( Nd4j . dataType ( ) == DataType . DOUBLE ) return scalar ( value . doubleValue ( ) , offset ) ; if ( Nd4j . dataType ( ) == DataType . FLOAT || Nd4j . dataType ( ) == DataType . HALF ) return scalar ( value . floatValue ( ) , offset ) ; if ( Nd4j . dataType ( ) == DataType . INT ) return scalar ( value . intValue ( ) , offset ) ; throw new IllegalStateException ( "Illegal data opType " + Nd4j . dataType ( ) ) ; }
Create a scalar ndarray with the specified offset