Skip to content

Commit

Permalink
Doc and news for dropping scalar dimensions
Browse files Browse the repository at this point in the history
  • Loading branch information
mbauman committed Nov 4, 2015
1 parent f90f304 commit 6817fc5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ Library improvements

* Linear algebra:

* All dimensions indexed by scalars are now dropped, whereas previously only
trailing scalar dimensions would be omitted from the result.

* New `normalize` and `normalize!` convenience functions for normalizing
vectors ([#13681]).

Expand Down
4 changes: 2 additions & 2 deletions doc/manual/arrays.rst
Original file line number Diff line number Diff line change
Expand Up @@ -233,8 +233,8 @@ where each ``I_k`` may be:
The result ``X`` generally has dimensions
``(length(I_1), length(I_2), ..., length(I_n))``, with location
``(i_1, i_2, ..., i_n)`` of ``X`` containing the value
``A[I_1[i_1], I_2[i_2], ..., I_n[i_n]]``. Trailing dimensions
indexed with scalars are dropped. For example, the dimensions of ``A[I, 1]`` will be
``A[I_1[i_1], I_2[i_2], ..., I_n[i_n]]``. All dimensions indexed with scalars are
dropped. For example, the result of ``A[2, I, 3]`` will be a vector with size
``(length(I),)``. Boolean vectors are first transformed with ``find``; the size of
a dimension indexed by a boolean vector will be the number of true values in the vector.
As a special part of this syntax, the ``end`` keyword may be used to represent the last
Expand Down

0 comments on commit 6817fc5

Please sign in to comment.