<br />

|---|
| [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/tensorflow/tensorflow/blob/v2.15.1/tensorflow/python/ops/numpy_ops/np_math_ops.py#L1054-L1086) |

TensorFlow variant of NumPy's `diff`.

```python
tf.experimental.numpy.diff(
    a, n=1, axis=-1
)
```

Unsupported arguments: `prepend`, `append`.

See the NumPy documentation for [`numpy.diff`](https://numpy.org/doc/stable/reference/generated/numpy.diff.html).