Skip to content

Commit ec0d730

Browse files
committed
add NEWS and compat
1 parent 5c7496f commit ec0d730

File tree

3 files changed

+7
-0
lines changed

3 files changed

+7
-0
lines changed

NEWS.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ New library features
8585
* New constructor `NamedTuple(iterator)` that constructs a named tuple from a key-value pair iterator.
8686
* A new `reinterpret(reshape, T, a::AbstractArray{S})` reinterprets `a` to have eltype `T` while potentially
8787
inserting or consuming the first dimension depending on the ratio of `sizeof(T)` and `sizeof(S)`.
88+
* `count` now accepts an optional `init` argument to control the accumulation type ([#37461]).
8889

8990
Standard library changes
9091
------------------------

base/reduce.jl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -944,6 +944,9 @@ Count the number of elements in `itr` for which the function `f` returns `true`.
944944
If `f` is omitted, counts the number of `true` elements in `itr` (which
945945
should be a collection of boolean values).
946946
947+
!!! compat "Julia 1.6"
948+
`init` keyword was added in Julia 1.6.
949+
947950
# Examples
948951
```jldoctest
949952
julia> count(i->(4<=i<=6), [2,3,4,5,6])

base/reducedim.jl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -369,6 +369,9 @@ dimensions.
369369
!!! compat "Julia 1.5"
370370
`dims` keyword was added in Julia 1.5.
371371
372+
!!! compat "Julia 1.6"
373+
`init` keyword was added in Julia 1.6.
374+
372375
# Examples
373376
```jldoctest
374377
julia> A = [1 2; 3 4]

0 commit comments

Comments
 (0)