@Override
    public Object element() {
        if (!isScalar())
            throw new IllegalStateException("Unable to getScalar the element of a non scalar");
        long idx = linearIndex(0);
        return Nd4j.createDouble(data.getDouble(idx), data.getDouble(idx + 1));
    }
@ Override public Object element ( ) { if ( ! isScalar ( ) ) throw new IllegalStateException ( "Unable to getScalar the element of a non scalar" ) ; long idx = linearIndex ( 0 ) ; return Nd4j . createDouble ( data . getDouble ( idx ) , data . getDouble ( idx + 1 ) ) ; }
Returns a scalar (individual element)
of a scalar ndarray

@return the individual item in this ndarray