Skip to content

Commit 34d0809

Browse files
committed
change subsetting for julia 1.0 compatibility
1 parent e2a4e82 commit 34d0809

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/elasticarray.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ end
118118

119119
function Base.deleteat!(A::ElasticArray{T,N}, idxs::NTuple{N,Union{Tuple{},Int,Vector{Int},UnitRange{Int}}}) where {T,N}
120120
d = ndims(A)
121-
prod(isempty.(first(idxs, length(idxs) - 1))) || throw(ArgumentError("Can only delete elements in the last dimension of A"))
121+
prod(isempty.(idxs[1:end-1])) || throw(ArgumentError("Can only delete elements in the last dimension of A"))
122122
issubset(last(idxs), axes(A, d)) || throw(BoundsError(A, (ntuple(_->:,d-1)..., last(idxs))))
123123
keep = setdiff(axes(A, d), last(idxs))
124124
copyto!(A, selectdim(A, d, keep))

0 commit comments

Comments
 (0)