Skip to content

Commit 0ed3a82

Browse files
avik-paldevmotion
andcommitted
Apply suggestions from code review
Co-authored-by: David Widmann <[email protected]>
1 parent 095a9d1 commit 0ed3a82

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/utils.jl

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
# overload for array types that
2-
@inline supports_fast_scalar_indexing(::Array) = true
2+
@inline supports_fast_scalar_indexing(::StridedArray) = true
33

44
@inline function supports_fast_scalar_indexing(x::AbstractArray)
5-
parent(x) === x && return false
6-
return supports_fast_scalar_indexing(parent(x))
5+
return parent(x) !== x && supports_fast_scalar_indexing(parent(x))
76
end
87

98
# Helper function for broadcasting

0 commit comments

Comments
 (0)