public static int getDimension ( INDArray arr , boolean defaultRows ) { // FIXME: int cast //ignore ordering for vectors if ( arr . isVector ( ) ) { return defaultRows ? ( int ) arr . rows ( ) : ( int ) arr . columns ( ) ; } if ( arr . ordering ( ) == NDArrayFactory . C ) return defaultRows ? ( int ) arr . columns ( ) : ( int ) arr . rows ( ) ; return defaultRows ? ( int ) arr . rows ( ) : ( int ) arr . columns ( ) ; }
Get the dimension associated with the given ordering .