function scalar2ndarrayLike( x, value ) {
	var buf;
	var set;
	var dt;

	dt = getDType( x );
	if ( dt === 'binary' ) {
		buf = allocUnsafe( 1 );
	} else {
		buf = emptyArray( 1, dt );
	}
	if ( /^complex/.test( dt ) && isNumber( value ) ) {
		value = [ value, 0.0 ]; // note: we're assuming that the ComplexXXArray setter accepts an array of interleaved real and imaginary components
	}
	if ( isAccessorArray( buf ) ) {
		set = accessorSetter( dt );
	} else {
		set = setter( dt );
	}
	set( buf, 0, value );
	return new x.constructor( dt, buf, [], [ 0 ], 0, getOrder( x ) );
}
Returns a zero-dimensional ndarray containing a provided scalar value and having the same data type as a provided ndarray.

@param {ndarray} x - input array
@param {*} value - scalar value
@throws {TypeError} first argument must have a recognized data type
@returns {ndarray} ndarray

@example
var zeros = require( '@stdlib/ndarray/base/zeros' );

var x = zeros( 'float32', [ 2, 2 ], 'row-major' );
// returns <ndarray>

var y = scalar2ndarrayLike( x, 1.0 );
// returns <ndarray>

var sh = y.shape;
// returns []

var dt = y.dtype;
// returns 'float32'

var v = y.get();
// returns 1.0