Mercurial > repos > public > sbplib_julia
diff src/LazyTensors/lazy_tensor_operations.jl @ 938:4a9a96d51940 bugfix/tensor_application_1d_cartesian_index
Fix dispatch issue when indexing a 1D TensorApplication with a CartiesianIndex
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Wed, 09 Mar 2022 11:19:17 +0100 |
parents | 76e5682d0e52 |
children | 1513355f64cd |
line wrap: on
line diff
--- a/src/LazyTensors/lazy_tensor_operations.jl Mon Feb 21 10:38:19 2022 +0100 +++ b/src/LazyTensors/lazy_tensor_operations.jl Wed Mar 09 11:19:17 2022 +0100 @@ -15,6 +15,7 @@ export LazyTensorMappingApplication Base.getindex(ta::LazyTensorMappingApplication{T,R}, I::Vararg{Any,R}) where {T,R} = apply(ta.t, ta.o, I...) +Base.getindex(ta::LazyTensorMappingApplication{T,1}, I::CartesianIndex{1}) where {T} = apply(ta.t, ta.o, I.I...) Base.size(ta::LazyTensorMappingApplication) = range_size(ta.t) # TODO: What else is needed to implement the AbstractArray interface?