function tensor1d(values, dtype) {
    (0, _util.assertNonNull)(values);
    const inferredShape = (0, _tensorUtilEnv.inferShape)(values, dtype);
    if (inferredShape.length !== 1) throw new Error("tensor1d() requires values to be a flat/TypedArray");
    const shape = null;
    return (0, _tensorOpsUtil.makeTensor)(values, shape, inferredShape, dtype);
}
Creates rank-1 `tf.Tensor` with the provided values, shape and dtype.

The same functionality can be achieved with `tf.tensor`, but in general
we recommend using `tf.tensor1d` as it makes the code more readable.

```js
tf.tensor1d([1, 2, 3]).print();
```

@param values The values of the tensor. Can be array of numbers,
    or a `TypedArray`.
@param dtype The data type.

@doc {heading: 'Tensors', subheading: 'Creation'}