Slicing works to create a permuted copy. But, is there some way to get the permutation in-place?

Linking this related post.

For columns it indicates: `Base.permutecols!!(A, p)`

Should we use for rows: `Base.permutecols!!(A', p)`

?

1 Like

This is a good find, thanks. (As well as thanks to @stevengj for recalling that bit of code.)

The matrix is indeed left alone, but there is a work vector that needs to be allocated (i.e. if we need to preserve the pivot vector.).

However, curiously, the time that it takes to do this is about the same for the slicing version and this in-place version.