@Override
    public IComplexNDArray put(int i, INDArray element) {
        if (element == null)
            throw new IllegalArgumentException("Unable to insert null element");
        assert element.isScalar() : "Unable to insert non scalar element";
        if (element instanceof IComplexNDArray) {
            IComplexNDArray n1 = (IComplexNDArray) element;
            IComplexNumber n = n1.getComplex(0);
            put(i, n);
        } else
            putScalar(i, Nd4j.createDouble(element.getDouble(0), 0.0));
        return this;
    }
@ Override public IComplexNDArray put ( int i , INDArray element ) { if ( element == null ) throw new IllegalArgumentException ( "Unable to insert null element" ) ; assert element . isScalar ( ) : "Unable to insert non scalar element" ; if ( element instanceof IComplexNDArray ) { IComplexNDArray n1 = ( IComplexNDArray ) element ; IComplexNumber n = n1 . getComplex ( 0 ) ; put ( i , n ) ; } else putScalar ( i , Nd4j . createDouble ( element . getDouble ( 0 ) , 0.0 ) ) ; return this ; }
Inserts the element at the specified index

@param i       the index insert into
@param element a scalar ndarray
@return a scalar ndarray of the element at this index