Skip to content

Commit

Permalink
add NEWS and compat
Browse files Browse the repository at this point in the history
  • Loading branch information
simeonschaub committed Oct 5, 2020
1 parent 5c7496f commit ec0d730
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ New library features
* New constructor `NamedTuple(iterator)` that constructs a named tuple from a key-value pair iterator.
* A new `reinterpret(reshape, T, a::AbstractArray{S})` reinterprets `a` to have eltype `T` while potentially
inserting or consuming the first dimension depending on the ratio of `sizeof(T)` and `sizeof(S)`.
* `count` now accepts an optional `init` argument to control the accumulation type ([#37461]).

Standard library changes
------------------------
Expand Down
3 changes: 3 additions & 0 deletions base/reduce.jl
Original file line number Diff line number Diff line change
Expand Up @@ -944,6 +944,9 @@ Count the number of elements in `itr` for which the function `f` returns `true`.
If `f` is omitted, counts the number of `true` elements in `itr` (which
should be a collection of boolean values).
!!! compat "Julia 1.6"
`init` keyword was added in Julia 1.6.
# Examples
```jldoctest
julia> count(i->(4<=i<=6), [2,3,4,5,6])
Expand Down
3 changes: 3 additions & 0 deletions base/reducedim.jl
Original file line number Diff line number Diff line change
Expand Up @@ -369,6 +369,9 @@ dimensions.
!!! compat "Julia 1.5"
`dims` keyword was added in Julia 1.5.
!!! compat "Julia 1.6"
`init` keyword was added in Julia 1.6.
# Examples
```jldoctest
julia> A = [1 2; 3 4]
Expand Down

0 comments on commit ec0d730

Please sign in to comment.