function convertSame( x, y ) {
	var dtype = getType( y );
	if ( dtype === null ) {
		throw new TypeError( format( 'invalid argument. Second argument must have a recognized/supported data type. Type: `%s`. Value: `%s`.', dtype, y ) );
	}
	return convert( x, dtype );
}
Converts an array to the same data type as a second input array.

@param {Collection} x - array to convert
@param {(Array|TypedArray|ComplexArray)} y - array having the desired output data type
@throws {TypeError} first argument must be an array-like object
@throws {TypeError} second argument must have a recognized data type
@returns {(Array|TypedArray|ComplexArray)} output array

@example
var Float64Array = require( '@stdlib/array/float64' );

var x = [ 1.0, 2.0, 3.0, 4.0 ];
var y = new Float64Array( 0 );

var out = convertSame( x, y );
// returns <Float64Array>[ 1.0, 2.0, 3.0, 4.0 ]