function strategy( x ) {
	var ndims;
	var xmmv;
	var len;
	var iox;
	var sh;
	var ns;
	var i;

	// Resolve the number of array dimensions:
	sh = x.shape;
	ndims = sh.length;

	// Check whether the ndarray is zero-dimensional...
	if ( ndims === 0 ) {
		return broadcast;
	}
	// Check whether the ndarray is already one-dimensional...
	if ( ndims === 1 ) {
		return identity;
	}
	// Determine the number of singleton dimensions...
	len = 1; // number of elements
	ns = 0;  // number of singleton dimensions
	for ( i = 0; i < ndims; i++ ) {
		// Check whether the current dimension is a singleton dimension...
		if ( sh[ i ] === 1 ) {
			ns += 1;
		}
		len *= sh[ i ];
	}
	// Determine whether the ndarray has only **one** non-singleton dimension (e.g., ndims=4, shape=[10,1,1,1]) so that we can simply create an ndarray view without the singleton dimensions...
	if ( ns === ndims-1 ) {
		// Get the index of the non-singleton dimension...
		for ( i = 0; i < ndims; i++ ) {
			if ( sh[ i ] !== 1 ) {
				break;
			}
		}
		return squeeze( x, i );
	}
	iox = iterationOrder( x.strides ); // +/-1

	// Determine whether we can avoid copying data...
	if ( iox !== 0 ) {
		// Determine the minimum and maximum linear indices which are accessible by the ndarray view:
		xmmv = minmaxViewBufferIndex( sh, x.strides, x.offset, [ 0, 0 ] );

		// Determine whether we can ignore shape (and strides) and create a new one-dimensional ndarray view...
		if ( len === ( xmmv[1]-xmmv[0]+1 ) ) {
			return contiguous( len, iox );
		}
		// The ndarray is non-contiguous, so we cannot directly interpret as a one-dimensional ndarray...

		// Fall-through to copying to a workspace ndarray...
	}
	// At this point, we're dealing with a non-contiguous multi-dimensional ndarray, so we need to copy to a contiguous workspace:
	return copy( len, ndarraylike2object( emptyLike( ndarraylike2ndarray( x ) ) ) ); // eslint-disable-line max-len
}
Returns a function for reshaping input ndarrays which have the same data type, shape, and strides as a provided ndarray.

@private
@param {ndarrayLike} x - input ndarray
@param {string} x.dtype - input ndarray data type
@param {Collection} x.data - input ndarray data buffer
@param {NonNegativeIntegerArray} x.shape - input ndarray shape
@param {IntegerArray} x.strides - input ndarray strides
@param {NonNegativeInteger} x.offset - input ndarray index offset
@param {string} x.order - input ndarray memory layout
@returns {Function} function implementing a reshape strategy