public static int numNewAxis(INDArrayIndex... axes) {
        int ret = 0;
        for (INDArrayIndex index : axes)
            if (index instanceof NewAxis)
                ret++;
        return ret;
    }
public static int numNewAxis ( INDArrayIndex ... axes ) { int ret = 0 ; for ( INDArrayIndex index : axes ) if ( index instanceof NewAxis ) ret ++ ; return ret ; }
Given an array of indexes
return the number of new axis elements
in teh array
@param axes the indexes to get the number
of new axes for
@return the number of new axis elements in the given array