function set( x, idx, value, strict ) {
	var sub;
	var sh;

	sh = getShape( x, false );
	idx = resolveIndex( idx, numel( sh ), strict );

	// In non-strict mode, avoid triggering an exception and always fail assignment if unable to resolve a linear index...
	if ( idx === -1 ) {
		return false;
	}
	// Convert a linear index to an array of subscripts according to the current ndarray view:
	sub = ind2sub( sh, getStrides( x ), 0, getOrder( x ), idx, 'throw' );

	// Append the new value to the subscripts array:
	sub.push( value );

	// Use the `#.set` method, which every ndarray-like object is expected to have, in order to update an ndarray element:
	x.set.apply( x, sub );

	return true;
}
Sets an ndarray element according to a linear index.

## Notes

-   For ndarray-like objects not having an `#.iset` method, this function falls back to resolving a linear index to an array of corresponding subscripts and calling a `#.set` method, which all ndarray-like objects are expected to have.

@private
@param {ndarrayLike} x - input ndarray
@param {string} idx - linear index string
@param {*} value - new value
@param {boolean} strict - boolean indicating whether to enforce strict bounds checking
@throws {RangeError} index exceeds ndarray bounds
@returns {boolean} boolean indicating whether assignment succeeded