old_contents: 'use strict';
  
  // MODULES //
  
  var bench = require( '@stdlib/bench' );
  var randu = require( '@stdlib/math/base/random/randu' );
  var isArray = require( '@stdlib/assert/is-array' );
  var shape2strides = require( '@stdlib/types/ndarray/base/shape2strides' );
  var strides2offset = require( '@stdlib/types/ndarray/base/strides2offset' );
  var numel = require( '@stdlib/types/ndarray/base/numel' );
  var pkg = require( './../package.json' ).name;
  var ndarray2array = require( './../lib' );
  
  
  // MAIN //
  
  bench( pkg+':order=row-major', function benchmark( b ) {
  	var strides;
  	var buffer;
  	var offset;
  	var order;
  	var shape;
  	var len;
  	var out;
  	var i;
  
  	shape = [ 10, 10, 10 ];
  	order = 'row-major';
  	len = numel( shape );
  	strides = shape2strides( shape, order );
  	offset = strides2offset( shape, strides );
  
  	buffer = new Array( len );
  	for ( i = 0; i < len; i++ ) {
  		buffer[ i ] = i;
  	}
  
  	b.tic();
  	for ( i = 0; i < b.iterations; i++ ) {
  		strides[ 1 ] *= ( randu() < 0.5 ) ? -1 : 1;
  		out = ndarray2array( buffer, shape, strides, offset, order );
  		if ( out.length !== shape[ 0 ] ) {
  			b.fail( 'should have expected length' );
  		}
  	}
  	b.toc();
  	if (
  		!isArray( out ) ||
  		!isArray( out[ 0 ] ) ||
  		!isArray( out[ 0 ][ 0 ] )
  	) {
  		b.fail( 'should return an array of arrays' );
  	}
  	b.pass( 'benchmark finished' );
  	b.end();
  });
  
  bench( pkg+':order=column-major', function benchmark( b ) {
  	var strides;
  	var buffer;
  	var offset;
  	var order;
  	var shape;
  	var len;
  	var out;
  	var i;
  
  	shape = [ 10, 10, 10 ];
  	order = 'column-major';
  	len = numel( shape );
  	strides = shape2strides( shape, order );
  	offset = strides2offset( shape, strides );
  
  	buffer = new Array( len );
  	for ( i = 0; i < len; i++ ) {
  		buffer[ i ] = i;
  	}
  
  	b.tic();
  	for ( i = 0; i < b.iterations; i++ ) {
  		strides[ 1 ] *= ( randu() < 0.5 ) ? -1 : 1;
  		out = ndarray2array( buffer, shape, strides, offset, order );
  		if ( out.length !== shape[ 0 ] ) {
  			b.fail( 'should have expected length' );
  		}
  	}
  	b.toc();
  	if (
  		!isArray( out ) ||
  		!isArray( out[ 0 ] ) ||
  		!isArray( out[ 0 ][ 0 ] )
  	) {
  		b.fail( 'should return an array of arrays' );
  	}
  	b.pass( 'benchmark finished' );
  	b.end();
  });
  
new_contents: 'use strict';
  
  // MODULES //
  
  var bench = require( '@stdlib/bench' );
  var randu = require( '@stdlib/math/base/random/randu' );
  var isArrayArray = require( '@stdlib/assert/is-array-array' );
  var shape2strides = require( '@stdlib/types/ndarray/base/shape2strides' );
  var strides2offset = require( '@stdlib/types/ndarray/base/strides2offset' );
  var numel = require( '@stdlib/types/ndarray/base/numel' );
  var pkg = require( './../package.json' ).name;
  var ndarray2array = require( './../lib' );
  
  
  // MAIN //
  
  bench( pkg+':order=row-major', function benchmark( b ) {
  	var strides;
  	var buffer;
  	var offset;
  	var order;
  	var shape;
  	var len;
  	var out;
  	var i;
  
  	shape = [ 10, 10, 10 ];
  	order = 'row-major';
  	len = numel( shape );
  	strides = shape2strides( shape, order );
  	offset = strides2offset( shape, strides );
  
  	buffer = new Array( len );
  	for ( i = 0; i < len; i++ ) {
  		buffer[ i ] = i;
  	}
  
  	b.tic();
  	for ( i = 0; i < b.iterations; i++ ) {
  		strides[ 1 ] *= ( randu() < 0.5 ) ? -1 : 1;
  		out = ndarray2array( buffer, shape, strides, offset, order );
  		if ( out.length !== shape[ 0 ] ) {
  			b.fail( 'should have expected length' );
  		}
  	}
  	b.toc();
  	if (
  		!isArrayArray( out ) ||
  		!isArrayArray( out[ 0 ] )
  	) {
  		b.fail( 'should return an array of arrays' );
  	}
  	b.pass( 'benchmark finished' );
  	b.end();
  });
  
  bench( pkg+':order=column-major', function benchmark( b ) {
  	var strides;
  	var buffer;
  	var offset;
  	var order;
  	var shape;
  	var len;
  	var out;
  	var i;
  
  	shape = [ 10, 10, 10 ];
  	order = 'column-major';
  	len = numel( shape );
  	strides = shape2strides( shape, order );
  	offset = strides2offset( shape, strides );
  
  	buffer = new Array( len );
  	for ( i = 0; i < len; i++ ) {
  		buffer[ i ] = i;
  	}
  
  	b.tic();
  	for ( i = 0; i < b.iterations; i++ ) {
  		strides[ 1 ] *= ( randu() < 0.5 ) ? -1 : 1;
  		out = ndarray2array( buffer, shape, strides, offset, order );
  		if ( out.length !== shape[ 0 ] ) {
  			b.fail( 'should have expected length' );
  		}
  	}
  	b.toc();
  	if (
  		!isArrayArray( out ) ||
  		!isArrayArray( out[ 0 ] )
  	) {
  		b.fail( 'should return an array of arrays' );
  	}
  	b.pass( 'benchmark finished' );
  	b.end();
  });
  
subject: Use utility to test for an array of arrays