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 Oct 14, 2015
1 parent 172cff3 commit 037bb58
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
13 changes: 9 additions & 4 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,15 @@ Library improvements

* New method for generic QR with column pivoting ([#13480]).

* A new `SparseVector` type allows for one-dimensional sparse arrays. Slicing
and reshaping sparse matrices now return vectors when appropriate. The
`sparsevec` function returns a one-dimensional sparse vector instead of a
one-column sparse matrix.
* Arrays:

* A new `SparseVector` type allows for one-dimensional sparse arrays. Slicing
and reshaping sparse matrices now return vectors when appropriate. The
`sparsevec` function returns a one-dimensional sparse vector instead of a
one-column sparse matrix.

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

Deprecated or removed
---------------------
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 037bb58

Please sign in to comment.