Skip to content

Commit 64fcd54

Browse files
Adopt suggestions.
1. remove `check_reducedims` within `mapfirst!`. `init_array!` for other reductions also skip this check. it should be safe to remove it as we add no `@inbounds` 2. remove unneeded `getindex`. Co-Authored-By: Andrew Radcliffe <96091198+andrewjradcliffe@users.noreply.github.com>
1 parent 73e8da5 commit 64fcd54

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

base/reducedim.jl

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,6 @@ Extract first entry of slices of array A into existing array R.
269269
copyfirst!(R::AbstractArray, A::AbstractArray) = mapfirst!(identity, R, A)
270270

271271
function mapfirst!(f::F, R::AbstractArray, A::AbstractArray{<:Any,N}) where {N, F}
272-
lsiz = check_reducedims(R, A)
273272
t = _firstreducedslice(axes(R), axes(A))
274273
map!(f, R, view(A, t...))
275274
end
@@ -1120,7 +1119,6 @@ function _findminmax!(f, op, Rval, Rind, A::AbstractArray{T,N}, keys::AbstractAr
11201119
for i in axes(A, 1)
11211120
tmpAv = f(A[i,IA])
11221121
tmpRv = Rval[i,IR]
1123-
tmpRi = Rind[i,IR]
11241122
if op(tmpRv, tmpAv)
11251123
Rval[i,IR] = tmpAv
11261124
Rind[i,IR] = keys[i,IA]

0 commit comments

Comments
 (0)