-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
xt::linalg::kron: support arguments of arbitrary number of dimensions
Before this commit, `xt::linalg::kron` only supports 2D arguments. This commit proposes to add support for argument with any number of dimensions. This change of behavior is coherent with what `numpy.kron` does. Given the implementation, it would probably make sense to return a xexpression instead of a xarray and allow lazy evaluation. This might be done in a separate commit. It could also be possible to have a dynamic check of the number of dimensions and use specialized implementation for the more common cases (i.e. 2D) at runtime, which should be more efficient. Tested with `./test/test_xtensor_blas --gtest_filter=xlinalg.kron*`.
- Loading branch information
Showing
2 changed files
with
50 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters