Skip to content

Commit

Permalink
NEWS for to_indices (#19730) (#22152)
Browse files Browse the repository at this point in the history
* NEWS for to_indices (#19730)
(cherry picked from commit 91f08bb)
  • Loading branch information
mbauman authored and tkelman committed Jun 17, 2017
1 parent 91d83c3 commit 3fb6535
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,22 @@ Library improvements
that dimension's length will be computed such that its product with all the other dimensions is equal
to the length of the original array ([#19919]).
* The new `to_indices` function provides a uniform interface for index conversions,
taking an array and a tuple of indices as arguments and returning a tuple of
integers and/or arrays of supported scalar indices. It will throw an `ArgumentError`
for any unsupported indices, and the returned arrays should be iterated over (and
not indexed into) to support more efficient logical indexing ([#19730]).
+ Using colons (`:`) to represent a collection of indices is deprecated. They now must be
explicitly converted to a specialized array of integers with the `to_indices` function.
   As a result, the type of `SubArray`s that represent views over colon indices has changed.
+ Logical indexing is now more efficient. Logical arrays are converted by `to_indices` to
a lazy, iterable collection of indices that doesn't support indexing. A deprecation
provides indexing support with O(n) lookup.
+ The performance of indexing with `CartesianIndex`es is also improved in many situations.
* A new `titlecase` function was added, to capitalize the first character of each word within a string ([#19469]).
* `any` and `all` now always short-circuit, and `mapreduce` never short-circuits ([#19543]).
Expand Down Expand Up @@ -671,6 +687,7 @@ Command-line option changes
[#19721]: https://github.com/JuliaLang/julia/issues/19721
[#19722]: https://github.com/JuliaLang/julia/issues/19722
[#19724]: https://github.com/JuliaLang/julia/issues/19724
[#19730]: https://github.com/JuliaLang/julia/issues/19730
[#19737]: https://github.com/JuliaLang/julia/issues/19737
[#19741]: https://github.com/JuliaLang/julia/issues/19741
[#19766]: https://github.com/JuliaLang/julia/issues/19766
Expand Down

0 comments on commit 3fb6535

Please sign in to comment.