@ Override public IComplexNDArray epsi ( Number other ) { IComplexNDArray linear = linearView ( ) ; double otherVal = other . doubleValue ( ) ; for ( int i = 0 ; i < linearView ( ) . length ( ) ; i ++ ) { IComplexNumber n = linear . getComplex ( i ) ; double real = n . realComponent ( ) . doubleValue ( ) ; double diff = Math . abs ( real - otherVal ) ; if ( diff <= Nd4j . EPS_THRESHOLD ) linear . putScalar ( i , Nd4j . createDouble ( 1 , 0 ) ) ; else linear . putScalar ( i , Nd4j . createDouble ( 0 , 0 ) ) ; } return this ; }
Returns an ndarray with 1 if the element is epsilon equals