Skip to content

Commit 9de3a4f

Browse files
committed
Disallow 0D scalar iteration.
1 parent 02b3fb8 commit 9de3a4f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/host/indexing.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ end
8383
Base.IndexStyle(::Type{<:AbstractGPUArray}) = Base.IndexLinear()
8484

8585
function Base.getindex(xs::AbstractGPUArray{T}, i::Integer) where T
86-
ndims(xs) > 0 && assertscalar("scalar getindex")
86+
assertscalar("scalar getindex")
8787
x = Array{T}(undef, 1)
8888
copyto!(x, 1, xs, i, 1)
8989
return x[1]

0 commit comments

Comments
 (0)