Bug: linalg.kron is not correct for matrices of ndims > 2 (original) (raw)

Description

See these discussions:

The fix is easy enough, we just have to switch from the scipy implementation to the numpy implementation. We can follow the JAX implementation here.

An alternative would be to keep our implementation, but BlockWise it so that the ndim > 2 case just broadcasts over the additional dimensions. It would make us equivalent to jax.vmap(jnp.kron)(A, B) by default.