public static byte getDataTypeAsByte(DataBuffer.Type type) {
        switch (type) {
            case FLOAT:
                return DataType.FLOAT;
            case DOUBLE:
                return DataType.DOUBLE;
            case HALF:
                return DataType.HALF;
            case INT:
                return DataType.INT32;
            case LONG:
                return DataType.INT64;
            default:
                throw new ND4JIllegalStateException("Unknown or unsupported DataType used: [" + type + "]");
        }
    }
public static byte getDataTypeAsByte(DataBuffer.Type type) {
        switch (type) {
            case FLOAT:
                return DataType.FLOAT;
            case DOUBLE:
                return DataType.DOUBLE;
            case HALF:
                return DataType.HALF;
            case INT:
                return DataType.INT32;
            case LONG:
                return DataType.INT64;
            default:
                throw new ND4JIllegalStateException("Unknown or unsupported DataType used: [" + type + "]");
        }
    }
public static byte getDataTypeAsByte ( DataBuffer . Type type ) { switch ( type ) { case FLOAT : return DataType . FLOAT ; case DOUBLE : return DataType . DOUBLE ; case HALF : return DataType . HALF ; case INT : return DataType . INT32 ; case LONG : return DataType . INT64 ; default : throw new ND4JIllegalStateException ( "Unknown or unsupported DataType used: [" + type + "]" ) ; } }
This method converts enums for DataType

@param type
@return
This method converts enums for DataType