function stack_(tensors, axis = 0) {
    const $tensors = (0, _tensorUtilEnv.convertToTensorArray)(tensors, "tensors", "stack", "string_or_numeric");
    _util.assert($tensors.length >= 1, ()=>"Pass at least one tensor to tf.stack");
    if ($tensors.length > 0) _util.assert(axis <= $tensors[0].rank, ()=>"Axis must be <= rank of the tensor");
    const inputs = $tensors;
    const attrs = {
        axis
    };
    return (0, _engine.ENGINE).runKernel((0, _kernelNames.Pack), inputs, attrs);
}
Stacks a list of rank-`R` `tf.Tensor`s into one rank-`(R+1)` `tf.Tensor`.

```js
const a = tf.tensor1d([1, 2]);
const b = tf.tensor1d([3, 4]);
const c = tf.tensor1d([5, 6]);
tf.stack([a, b, c]).print();
```

@param tensors A list of tensor objects with the same shape and dtype.
@param axis The axis to stack along. Defaults to 0 (the first dim).

@doc {heading: 'Tensors', subheading: 'Slicing and Joining'}