-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add
squeeze
requirements from #9271 to docs
Also clean up spacing for `permutedims` while I'm here. cc @ivarne
- Loading branch information
Showing
1 changed file
with
7 additions
and
6 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4469,21 +4469,22 @@ Indexing, Assignment, and Concatenation | |
Find the next index >= ``i`` of an element of ``A`` equal to ``v`` (using ``==``), | ||
or ``0`` if not found. | ||
|
||
.. function:: permutedims(A,perm) | ||
.. function:: permutedims(A, perm) | ||
|
||
Permute the dimensions of array ``A``. ``perm`` is a vector specifying a permutation of length ``ndims(A)``. This is a generalization of transpose for multi-dimensional arrays. Transpose is equivalent to ``permutedims(A,[2,1])``. | ||
Permute the dimensions of array ``A``. ``perm`` is a vector specifying a permutation of length ``ndims(A)``. This is a generalization of transpose for multi-dimensional arrays. Transpose is equivalent to ``permutedims(A, [2,1])``. | ||
|
||
.. function:: ipermutedims(A,perm) | ||
.. function:: ipermutedims(A, perm) | ||
|
||
Like :func:`permutedims`, except the inverse of the given permutation is applied. | ||
|
||
.. function:: permutedims!(dest,src,perm) | ||
.. function:: permutedims!(dest, src, perm) | ||
|
||
Permute the dimensions of array ``src`` and store the result in the array ``dest``. ``perm`` is a vector specifying a permutation of length ``ndims(src)``. The preallocated array ``dest`` should have ``size(dest)=size(src)[perm]`` and is completely overwritten. No in-place permutation is supported and unexpected results will happen if `src` and `dest` have overlapping memory regions. | ||
Permute the dimensions of array ``src`` and store the result in the array ``dest``. ``perm`` is a vector specifying a permutation of length ``ndims(src)``. The preallocated array ``dest`` should have ``size(dest) == size(src)[perm]`` and is completely overwritten. No in-place permutation is supported and unexpected results will happen if `src` and `dest` have overlapping memory regions. | ||
|
||
.. function:: squeeze(A, dims) | ||
|
||
Remove the dimensions specified by ``dims`` from array ``A`` | ||
Remove the dimensions specified by ``dims`` from array ``A``. Elements of | ||
``dims`` must be unique and be within the interval ``[1, ndims(A)]``. | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
ivarne
Member
|
||
|
||
.. function:: vec(Array) -> Vector | ||
|
||
|
Thanks!
It's obvious from the context that you intend a closed interval
1,ndims(A)
, but is it clearer to use a Julia range instead?... must be unique and in the range ``1:ndims(A)``
I always forget which brace you use for open and closed intervals.