changeset 941:1513355f64cd bugfix/tensor_application_1d_cartesian_index

Add a comment
author Jonatan Werpers <jonatan@werpers.com>
date Sat, 12 Mar 2022 22:36:02 +0100
parents 4a9a96d51940
children 6a2e30fa3bd8
files src/LazyTensors/lazy_tensor_operations.jl
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/LazyTensors/lazy_tensor_operations.jl	Wed Mar 09 11:19:17 2022 +0100
+++ b/src/LazyTensors/lazy_tensor_operations.jl	Sat Mar 12 22:36:02 2022 +0100
@@ -15,7 +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.getindex(ta::LazyTensorMappingApplication{T,1}, I::CartesianIndex{1}) where {T} = apply(ta.t, ta.o, I.I...) # Would otherwise be caught in the previes method.
 Base.size(ta::LazyTensorMappingApplication) = range_size(ta.t)
 # TODO: What else is needed to implement the AbstractArray interface?