Skip to content

Commit 69a2a57

Browse files
authored
Stop documenting that permute! is "in-place"; it isn't and never has been non-allocating (JuliaLang#58902)
1 parent 4846c3d commit 69a2a57

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

base/combinatorics.jl

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -184,13 +184,12 @@ end
184184
"""
185185
permute!(v, p)
186186
187-
Permute vector `v` in-place, according to permutation `p`. No checking is done
188-
to verify that `p` is a permutation.
187+
Permute vector `v` according to permutation `p`, storing the result back into `v`.
188+
No checking is done to verify that `p` is a permutation.
189189
190190
To return a new permutation, use `v[p]`. This is generally faster than `permute!(v, p)`;
191191
it is even faster to write into a pre-allocated output array with `u .= @view v[p]`.
192-
(Even though `permute!` overwrites `v` in-place, it internally requires some allocation
193-
to keep track of which elements have been moved.)
192+
(Even though `permute!` overwrites `v` in-place, it internally requires some allocation.)
194193
195194
$(_DOCS_ALIASING_WARNING)
196195

0 commit comments

Comments
 (0)