jax.scipy.linalg.fiedler#
- jax.scipy.linalg.fiedler(a)[source]#
Construct a symmetric Fiedler matrix.
JAX implementation of
scipy.linalg.fiedler().The Fiedler matrix has entries \(F_{ij} = |a_i - a_j|\) for \(0 \le i, j < n\), where
ais the input vector. The result is symmetric with a zero diagonal.- Parameters:
a (ArrayLike) – array of shape
(..., N).- Returns:
A Fiedler matrix of shape
(..., N, N).- Return type:
Examples
>>> jax.scipy.linalg.fiedler(jnp.array([1, 4, 12, 45, 77])) Array([[ 0, 3, 11, 44, 76], [ 3, 0, 8, 41, 73], [11, 8, 0, 33, 65], [44, 41, 33, 0, 32], [76, 73, 65, 32, 0]], dtype=int32)