Mercurial > repos > public > sbplib_julia
diff src/LazyTensors/lazy_tensor_operations.jl @ 458:41f9cb6ee5a7 feature/inflated_tensormapping
Moar tests and moar type stableness
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Wed, 21 Oct 2020 20:57:38 +0200 |
parents | 8fb6a5611c7a |
children | 11e58c49fb46 c364e2908c6e |
line wrap: on
line diff
--- a/src/LazyTensors/lazy_tensor_operations.jl Wed Oct 21 20:10:27 2020 +0200 +++ b/src/LazyTensors/lazy_tensor_operations.jl Wed Oct 21 20:57:38 2020 +0200 @@ -230,8 +230,8 @@ ``` """ function split_index(itm::InflatedTensorMapping{T,R,D}, I::Vararg{Any,R}) where {T,R,D} - I_before = I[1:range_dim(itm.before)] - I_after = slice_tuple(I,Val(R-range_dim(itm.after)+1),Val(R)) + I_before = slice_tuple(I, Val(1), Val(range_dim(itm.before))) + I_after = slice_tuple(I, Val(R-range_dim(itm.after)+1), Val(R)) view_index = (I_before..., ntuple((i)->:,domain_dim(itm.tm))..., I_after...) inner_index = slice_tuple(I, Val(range_dim(itm.before)+1), Val(R-range_dim(itm.after)))