function complex2real( x ) {
	var ndims = x.shape.length;

	x.data = reinterpretComplex( x.data, 0 );
	x.accessorProtocol = false;
	x.dtype = COMPLEX_TO_REAL[ x.dtype ];
	x.strides = gscal( ndims, 2, x.strides, 1 );
	x.offset *= 2;

	// Append a trailing dimension where each element is the real and imaginary component for a corresponding element in the original input ndarray (note: this means that a two-dimensional complex-valued ndarray becomes a three-dimensional real-valued ndarray; while this does entail additional loop overhead, it is still significantly faster than sending complex-valued ndarrays down the accessor path):
	x.shape.push( 2 ); // real and imaginary components

	// Augment the strides, where we assume that real and imaginary components are adjacent in memory...
	if ( ndims === 0 ) {
		x.strides[ 0 ] = 1;
	} else {
		x.strides.push( 1 );
	}
	return x;
}
Converts a complex-valued floating-point ndarray to a real-valued floating-point ndarray.

## Notes

-   The function mutates the input ndarray object.

@private
@param {Object} x - input ndarray object
@returns {Object} output ndarray object