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
Yeah, this is a bit of a wart. I have an old branch where I started parameterizing all these indices structures, but I recall hitting a number of roadblocks making this trickier than it first appears.
In some senses, I'm ok with LinearIndices being restricted to only being integer values — you're explicitly requesting a "memory offset"-like representation of the array, so an inability to represent values larger than Int is reasonable. The trouble is that keys should definitely always work, and right now there's a nice symmetry that it always returns either a Linear- or CartesianIndices.
The easy fix is to just patch up keys(::AbstractRange) to deal with these cases, but it'd be nice to find a generic behavior that's a bit more friendly to non-Int indices.
Due to
LinearIndices
only supportingInt
s,keys
andLinearIndices
do not work when the indices are not representable asInt
s:Related: #27090
The text was updated successfully, but these errors were encountered: