public static boolean isScalar ( INDArray indexOver , INDArrayIndex ... indexes ) { boolean allOneLength = true ; for ( int i = 0 ; i < indexes . length ; i ++ ) { allOneLength = allOneLength && indexes [ i ] . length ( ) == 1 ; } int numNewAxes = NDArrayIndex . numNewAxis ( indexes ) ; if ( allOneLength && numNewAxes == 0 && indexes . length == indexOver . rank ( ) ) return true ; else if ( allOneLength && indexes . length == indexOver . rank ( ) - numNewAxes ) { return allOneLength ; } return allOneLength ; }
Check if the given indexes over the specified array are searching for a scalar