diff options
Diffstat (limited to 'macros/ipermute.sci')
-rw-r--r-- | macros/ipermute.sci | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/macros/ipermute.sci b/macros/ipermute.sci index ed78383..551d2c4 100644 --- a/macros/ipermute.sci +++ b/macros/ipermute.sci @@ -12,6 +12,7 @@ function B = ipermute(A, perm) // B = ipermute(A, perm) returns the array A with dimensions inverted // according to the permutation vector `perm`. // Validate the permutation vector + if max(size(perm)) ~= ndims(A) || or(gsort(perm, "g", "i") ~= 1:ndims(A)) error('Permutation vector must contain unique integers from 1 to ndims(A).'); end |