Skip to content

Commit 52d85bb

Browse files
committed
fix reshape
1 parent fbfee35 commit 52d85bb

File tree

2 files changed

+1
-1
lines changed

2 files changed

+1
-1
lines changed

src/tensors/abstracttensor.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -644,6 +644,7 @@ function project_symmetric!(t::AbstractTensorMap, data::AbstractArray)
644644
matsize = (dim(codom), dim(dom))
645645
(size(data) == arraysize || size(data) == matsize) ||
646646
throw(DimensionMismatch("input data has incompatible size for the given tensor"))
647+
data = reshape(collect(data), arraysize)
647648

648649
I = sectortype(t)
649650
if I === Trivial && t isa TensorMap

src/tensors/tensor.jl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,6 @@ function _TensorMap{T, A}(
219219

220220
# do projection
221221
t = _TensorMap{T, A}(undef, V)
222-
arraydata = reshape(collect(data), arraysize)
223222
t = project_symmetric!(t, arraydata)
224223

225224
# verify result

0 commit comments

Comments
 (0)