diff src/LazyTensors/lazy_tensor_operations.jl @ 957:86889fc5b63f feature/tensormapping_application_promotion

Merge default
author Jonatan Werpers <jonatan@werpers.com>
date Mon, 14 Mar 2022 08:48:02 +0100
parents 4a4ef4bf6cb9 6a2e30fa3bd8
children e79debd10f7d 089a1411dfc0
line wrap: on
line diff
--- a/src/LazyTensors/lazy_tensor_operations.jl	Sat Mar 12 22:26:23 2022 +0100
+++ b/src/LazyTensors/lazy_tensor_operations.jl	Mon Mar 14 08:48:02 2022 +0100
@@ -29,6 +29,7 @@
 # TODO: Do boundschecking on creation!
 
 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...) # Would otherwise be caught in the previous method.
 Base.size(ta::LazyTensorMappingApplication) = range_size(ta.t)
 # TODO: What else is needed to implement the AbstractArray interface?