comparison src/LazyTensors/tensor_mapping.jl @ 943:fb060e98ac0a feature/tensormapping_application_promotion

Remove more type assertions
author Jonatan Werpers <jonatan@werpers.com>
date Thu, 10 Mar 2022 16:57:01 +0100
parents 76e5682d0e52
children 4a4ef4bf6cb9
comparison
equal deleted inserted replaced
942:7829c09f8137 943:fb060e98ac0a
22 """ 22 """
23 abstract type TensorMapping{T,R,D} end 23 abstract type TensorMapping{T,R,D} end
24 export TensorMapping 24 export TensorMapping
25 25
26 """ 26 """
27 apply(t::TensorMapping{T,R,D}, v::AbstractArray{T,D}, I::Vararg) where {R,D,T} 27 apply(t::TensorMapping{T,R,D}, v::AbstractArray{<:Any,D}, I::Vararg) where {R,D,T}
28 28
29 Return the result of the mapping for a given index. 29 Return the result of the mapping for a given index.
30 """ 30 """
31 function apply end 31 function apply end
32 export apply 32 export apply
33 33
34 """ 34 """
35 apply_transpose(t::TensorMapping{T,R,D}, v::AbstractArray{T,R}, I::Vararg) where {R,D,T} 35 apply_transpose(t::TensorMapping{T,R,D}, v::AbstractArray{<:Any,R}, I::Vararg) where {R,D,T}
36 36
37 Return the result of the transposed mapping for a given index. 37 Return the result of the transposed mapping for a given index.
38 """ 38 """
39 function apply_transpose end 39 function apply_transpose end
40 export apply_transpose 40 export apply_transpose