Skip to content

Commit b567b2e

Browse files
authored
inference in TimesOperator adjoint/transpose (#160)
1 parent 4a6ee89 commit b567b2e

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name = "ApproxFunBase"
22
uuid = "fbd15aa5-315a-5a7d-a8a4-24992e37be05"
3-
version = "0.6.9"
3+
version = "0.6.10"
44

55
[deps]
66
AbstractFFTs = "621f4979-c628-5d54-868e-fcf4e3e8185c"

src/Operators/general/algebra.jl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -479,7 +479,9 @@ end
479479

480480

481481
for OP in (:(adjoint),:(transpose))
482-
@eval $OP(A::TimesOperator)=TimesOperator(reverse!(map($OP,A.ops)))
482+
@eval $OP(A::TimesOperator) = TimesOperator(
483+
convert(Vector{Operator{eltype(A)}}, reverse!(map($OP,A.ops)))::Vector{Operator{eltype(A)}},
484+
reverse(bandwidths(A)))
483485
end
484486

485487
function *(A::Operator,B::Operator)

test/runtests.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,7 @@ end
160160
@test MT == M * T
161161
@test T * M == M * T == M * M * M
162162
@test TT == T * T == M * M * M * M
163+
@test (@inferred adjoint(T)) == adjoint(M) * adjoint(M)
163164
end
164165
@testset "plus operator" begin
165166
c = [1,2,3]

0 commit comments

Comments
 (0)