Return a reduced shape of an ndarray.
var reducedShape = require( '@stdlib/ndarray/base/reduced-shape' );Returns a reduced shape of an ndarray.
var zeros = require( '@stdlib/ndarray/zeros' );
var x = zeros( [ 3, 2, 3 ] );
// returns <ndarray>
var sh = reducedShape( x, [ 0, 1 ] );
// returns [ 3 ]var zeros = require( '@stdlib/ndarray/zeros' );
var reducedShape = require( '@stdlib/ndarray/base/reduced-shape' );
// Create an array:
var x = zeros( [ 1, 2, 3, 2 ] );
// returns <ndarray>
var sh = reducedShape( x, [ 0, 1 ] );
console.log( sh );
// => [ 3, 2 ]
sh = reducedShape( x, [ 0, 3 ] );
console.log( sh );
// => [ 2, 3 ]
sh = reducedShape( x, [ 1, 3 ] );
console.log( sh );
// => [ 1, 3 ]