You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We currently provide optimized methods for findnext/prev(testf::Function, B::BitArray, start::Integer), but not for findnext/prev(testf::Function, B::BitArray, start::CartesianIndex). There are two problems:
The lack of optimized BitArray methods for CartesianIndex means that the slow AbstractArray fallback is used, in particular by findfirst and findlast.
The methods for Integer are inconsistent with Array/AbstractArray, for which we don't support passing a linear index (except for vectors). That's not a big deal since these additional BitArray methods don't conflict with the AbstractArray ones (and it would make sense to add them for AbstractArray for when you want a linear index result).
We currently provide optimized methods for
findnext/prev(testf::Function, B::BitArray, start::Integer)
, but not forfindnext/prev(testf::Function, B::BitArray, start::CartesianIndex)
. There are two problems:BitArray
methods forCartesianIndex
means that the slowAbstractArray
fallback is used, in particular byfindfirst
andfindlast
.Integer
are inconsistent withArray
/AbstractArray
, for which we don't support passing a linear index (except for vectors). That's not a big deal since these additionalBitArray
methods don't conflict with theAbstractArray
ones (and it would make sense to add them forAbstractArray
for when you want a linear index result).See also #30102.
The text was updated successfully, but these errors were encountered: