function singletonOrArray(xs) {
	  if (xs.length === 1) {
	    return xs[0];
	  }

	  return xs;
	}
If an array is of length 1, just return the first element. Otherwise, return
the full array.
@param tensors