sdr.hamming(x: NDArray[int_], y: NDArray[int_], axis: int | tuple[int, ...] | None = None) NDArray[int_]

Measures the Hamming distance between two signals \(x[n]\) and \(y[n]\).

\[d = \sum_{n=0}^{N-1} x[n] \oplus y[n]\]

Parameters:
x: NDArray[int_]

The time-domain signal \(x[n]\).

y: NDArray[int_]

The time-domain signal \(y[n]\).

axis: int | tuple[int, ...] | None = None

Axis or axes along which to compute the distance. The default is None, which computes the distance across the entire array.

Returns:

The Hamming distance between \(x[n]\) and \(y[n]\).