function sliceTo( x, stop, strict, writable ) {
	var args;
	var i;

	args = [];
	for ( i = 0; i < stop.length; i++ ) {
		if ( isNumber( stop[ i ] ) ) {
			args.push( new Slice( stop[ i ] ) );
		} else {
			args.push( null );
		}
	}
	return slice( x, args2multislice( args ), strict, writable );
}
Returns a truncated view of an input ndarray.

@param {ndarray} x - input array
@param {Array<null|void|integer>} stop - ending indices (exclusive)
@param {boolean} strict - boolean indicating whether to enforce strict bounds checking
@param {boolean} writable - boolean indicating whether a returned array should be writable
@throws {RangeError} number of slice dimensions must match the number of array dimensions
@throws {RangeError} slice exceeds array bounds
@returns {ndarray} ndarray view

@example
var ndarray = require( '@stdlib/ndarray/ctor' );
var ndarray2array = require( '@stdlib/ndarray/to-array' );

var buffer = [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ];
var shape = [ 3, 2 ];
var strides = [ 2, 1 ];
var offset = 0;

var x = ndarray( 'generic', buffer, shape, strides, offset, 'row-major' );
// returns <ndarray>

var sh = x.shape;
// returns [ 3, 2 ]

var arr = ndarray2array( x );
// returns [ [ 1.0, 2.0 ], [ 3.0, 4.0 ], [ 5.0, 6.0 ] ]

var s = [ 2, null ];
var y = sliceTo( x, s, false, false );
// returns <ndarray>

sh = y.shape;
// returns [ 2, 2 ]

arr = ndarray2array( y );
// returns [ [ 1.0, 2.0 ], [ 3.0, 4.0 ] ]