function rand_(shape, randFunction, dtype) {
	  var size = sizeFromShape(shape);
	  var values = null;

	  if (dtype == null || dtype === 'float32') {
	    values = new Float32Array(size);
	  } else if (dtype === 'int32') {
	    values = new Int32Array(size);
	  } else if (dtype === 'bool') {
	    values = new Uint8Array(size);
	  } else {
	    throw new Error("Unknown data type " + dtype);
	  }

	  for (var i = 0; i < size; i++) {
	    values[i] = randFunction();
	  }

	  return ENGINE.makeTensor(values, shape, dtype);
	}
Creates a `tf.Tensor` with values sampled from a random number generator
function defined by the user.

@param shape An array of integers defining the output tensor shape.
@param randFunction A random number generator function which is called
for each element in the output tensor.
@param dtype The data type of the output tensor. Defaults to 'float32'.