Skip to content

Commit b57ff80

Browse files
author
Katharine Hyatt
committed
Add missing ctor
1 parent d834d78 commit b57ff80

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/tensors/tensor.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ struct TensorMap{T, S <: IndexSpace, N₁, N₂, A <: DenseVector{T}} <: Abstrac
2121
end
2222
return TensorMap{T, S, N₁, N₂, A}(data, space)
2323
end
24-
2524
# constructors from data
2625
function TensorMap{T, S, N₁, N₂, A}(
2726
data::A, space::TensorMapSpace{S, N₁, N₂}
@@ -34,6 +33,8 @@ struct TensorMap{T, S <: IndexSpace, N₁, N₂, A <: DenseVector{T}} <: Abstrac
3433
return new{T, S, N₁, N₂, A}(data, space)
3534
end
3635
end
36+
# constructors from another TensorMap -- no-op
37+
TensorMap{T, S, N₁, N₂, A}(t::TensorMap{T, S, N₁, N₂, A}) where {T, S <: IndexSpace, N₁, N₂, A <: DenseVector{T}} = t
3738

3839
"""
3940
Tensor{T, S, N, A<:DenseVector{T}} = TensorMap{T, S, N, 0, A}

0 commit comments

Comments
 (0)