function dispatcher() {
		var arrays;
		var dtypes;
		var argc;
		var idx;
		var v;
		var f;
		var i;

		argc = arguments.length;
		if ( argc !== nargs ) {
			if ( argc < nargs ) {
				throw new Error( 'invalid invocation. Insufficient arguments.' );
			}
			throw new Error( 'invalid invocation. Too many arguments.' );
		}
		arrays = [];
		dtypes = [];
		for ( i = 0; i < nargs; i++ ) {
			v = arguments[ i ];
			if ( !isndarrayLike( v ) ) {
				if ( i < nin ) {
					throw new TypeError( format( 'invalid argument. Input array must be an ndarray-like object. Value: `%s`.', v ) );
				} else {
					throw new TypeError( format( 'invalid argument. Output array must be an ndarray-like object. Value: `%s`.', v ) );
				}
			}
			arrays.push( v );
			dtypes.push( resolveEnum( getDType( v ) ) );
		}
		// Resolve the ndarray function satisfying the input array types:
		idx = indexOfTypes( nfcns, narrays, types, narrays, 1, 0, dtypes, 1, 0 ); // eslint-disable-line max-len

		// Check whether we were able to successfully resolve an ndarray function:
		if ( idx < 0 ) {
			throw new TypeError( 'invalid arguments. Unable to resolve an ndarray function supporting the provided array argument data types.' );
		}
		// Retrieve the ndarray function:
		if ( fcn ) {
			f = fcn;
		} else {
			f = fcns[ idx ];
		}
		// Evaluate the ndarray function:
		if ( data ) {
			f( arrays, data[ idx ] );
		} else {
			f( arrays );
		}
		if ( nout === 1 ) {
			return arrays[ narrays-1 ];
		}
		if ( nout === 0 ) {
			return;
		}
		return arrays.slice( nin );
	}
ndarray function interface which performs multiple dispatch.

@private
@param {ndarrayLike} x - ndarray
@param {...ndarrayLike} args - ndarray arguments
@throws {Error} insufficient arguments
@throws {Error} too many arguments
@throws {TypeError} input array arguments must be ndarray-like objects
@throws {TypeError} output array arguments must be ndarray-like objects
@throws {TypeError} unable to resolve an ndarray function supporting the provided ndarray argument data types
@returns {(ndarrayLike|Array<ndarrayLike>|void)} destination array(s)