mlx.core.diff# diff(a: array, /, n: int = 1, axis: int = -1, *, stream: StreamOrDevice = None) → array# The n-th discrete difference along the given axis. 参数: a (array) -- Input array. n (int, optional) -- The number of times to difference. Default: 1. axis (int, optional) -- The axis along which to difference. Default: -1. 返回: The n-th differences. 返回类型: array