mlx.core.kron#
- kron(a: array, b: array, *, stream: None | Stream | Device = None) array #
Compute the Kronecker product of two arrays
a
andb
.- Parameters:
- Returns:
The Kronecker product of
a
andb
.- Return type:
Examples
>>> a = mx.array([[1, 2], [3, 4]]) >>> b = mx.array([[0, 5], [6, 7]]) >>> result = mx.kron(a, b) >>> print(result) array([[0, 5, 0, 10], [6, 7, 12, 14], [0, 15, 0, 20], [18, 21, 24, 28]], dtype=int32)