@@ -94,12 +94,12 @@ data there in a format that is explicit about how tensor data is associated with
9494structural part of the tensor, i.e. the splitting and fusion tree pairs. Therefore, on the
9595older version of TensorKit.jl, use the following code to save the data
9696
97- ``` julia
98- using JLD2
99- filename = " choose_some_filename.jld2"
100- t_dict = Dict (:space => space (t), :data => Dict ((f₁, f₂) => t[f₁, f₂] for (f₁, f₂) in fusiontrees (t)))
101- jldsave (filename; t_dict)
102- ```
97+ ``` julia
98+ using JLD2
99+ filename = " choose_some_filename.jld2"
100+ t_dict = Dict (:space => space (t), :data => Dict ((f₁, f₂) => t[f₁, f₂] for (f₁, f₂) in fusiontrees (t)))
101+ jldsave (filename; t_dict)
102+ ```
103103
104104If you have already upgraded to TensorKit.jl v0.13, you can still install the old version in
105105a separate environment, for example a temporary environment. To do this, run
@@ -123,7 +123,12 @@ data and reconstruct the tensor as follows:
123123``` julia
124124using JLD2
125125filename = " choose_some_filename.jld2"
126- t = convert (TensorMap, load_object (filename))
126+ t_dict = jldload (filename)
127+ T = eltype (valtype (t_dict[:data ]))
128+ t = TensorMap {T} (undef, t_dict[:space ])
129+ for ((f₁, f₂), val) in t_dict[:data ]
130+ t[f₁, f₂] .= val
131+ end
127132```
128133
129134## Overview
0 commit comments