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
This allows easier conversion from a `BandIndex` to a `CartesianIndex`
by using the `CartesianIndex` constructor. It also skips the
intermediate conversion in `to_indices` where we need the `(row,
column)` tuple directly.
After this, the following is possible:
```julia
julia> b = LinearAlgebra.BandIndex(0, 2)
BandIndex(0, 2)
julia> c = CartesianIndex(b)
CartesianIndex(2, 2)
julia> LinearAlgebra.BandIndex(c)
BandIndex(0, 2)
```
I had not added the constructor earlier to avoid potential
invalidations, but I don't think this is a factor, given that `Base`
already defines four methods for `CartesianIndex`.
0 commit comments