Skip to content

Commit cbc3942

Browse files
committed
some fixes after merges
1 parent ea739a4 commit cbc3942

File tree

5 files changed

+22
-457
lines changed

5 files changed

+22
-457
lines changed

test/autodiff/ad.jl

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
using Test, TestExtras
22
using TensorKit
3+
using TensorKit: type_repr, SectorDict
34
using TensorOperations
45
using ChainRulesCore
56
using ChainRulesTestUtils
@@ -36,7 +37,7 @@ function ChainRulesTestUtils.test_approx(
3637
end
3738

3839
# make sure that norms are computed correctly:
39-
function FiniteDifferences.to_vec(t::TK.SectorDict)
40+
function FiniteDifferences.to_vec(t::SectorDict)
4041
T = scalartype(valtype(t))
4142
vec = mapreduce(vcat, t; init = T[]) do (c, b)
4243
return reshape(b, :) .* sqrt(dim(c))
@@ -46,7 +47,7 @@ function FiniteDifferences.to_vec(t::TK.SectorDict)
4647
function from_vec(x_real)
4748
x = T <: Real ? x_real : reinterpret(T, x_real)
4849
ctr = 0
49-
return TK.SectorDict(
50+
return SectorDict(
5051
c => (
5152
n = length(b);
5253
b′ = reshape(view(x, ctr .+ (1:n)), size(b)) ./ sqrt(dim(c));
@@ -200,7 +201,7 @@ spacelist = (
200201

201202
for V in spacelist
202203
I = sectortype(eltype(V))
203-
Istr = TK.type_repr(I)
204+
Istr = type_repr(I)
204205
eltypes = isreal(sectortype(eltype(V))) ? (Float64, ComplexF64) : (ComplexF64,)
205206
symmetricbraiding = BraidingStyle(sectortype(eltype(V))) isa SymmetricBraiding
206207
println("---------------------------------------")

0 commit comments

Comments
 (0)