From 2f09b930ff0a22a4262afbeefce958ef63f2f470 Mon Sep 17 00:00:00 2001 From: Simon Kornblith Date: Tue, 9 Dec 2014 13:33:06 -0500 Subject: [PATCH] Add `squeeze` requirements from #9271 to docs Also clean up spacing for `permutedims` while I'm here. cc @ivarne --- doc/stdlib/base.rst | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/doc/stdlib/base.rst b/doc/stdlib/base.rst index 11d24269c5a3b..6a0a938f251a9 100644 --- a/doc/stdlib/base.rst +++ b/doc/stdlib/base.rst @@ -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)]``. .. function:: vec(Array) -> Vector