Skip to content

Commit 69433ec

Browse files
authored
[ITensors] Qualify overloading NDTensors.Tensor (#1648)
1 parent 323b58f commit 69433ec

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

Project.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "ITensors"
22
uuid = "9136182c-28ba-11e9-034c-db9fb085ebd5"
33
authors = ["Matthew Fishman <[email protected]>", "Miles Stoudenmire <[email protected]>"]
4-
version = "0.9.4"
4+
version = "0.9.5"
55

66
[deps]
77
Adapt = "79e6a3ab-5dfb-504d-930d-738a2a938a0e"

src/itensor.jl

+3-3
Original file line numberDiff line numberDiff line change
@@ -148,16 +148,16 @@ ITensor(::AliasStyle, args...; kwargs...)::ITensor = error(
148148
Create a `Tensor` that stores a copy of the storage and
149149
indices of the input `ITensor`.
150150
"""
151-
Tensor(T::ITensor)::Tensor = Tensor(NeverAlias(), T)
152-
Tensor(as::NeverAlias, T::ITensor)::Tensor = Tensor(AllowAlias(), copy(T))
151+
NDTensors.Tensor(T::ITensor)::Tensor = Tensor(NeverAlias(), T)
152+
NDTensors.Tensor(as::NeverAlias, T::ITensor)::Tensor = Tensor(AllowAlias(), copy(T))
153153

154154
"""
155155
tensor(::ITensor)
156156
157157
Convert the `ITensor` to a `Tensor` that shares the same
158158
storage and indices as the `ITensor`.
159159
"""
160-
Tensor(::AllowAlias, A::ITensor) = A.tensor
160+
NDTensors.Tensor(::AllowAlias, A::ITensor) = A.tensor
161161

162162
"""
163163
ITensor([::Type{ElT} = Float64, ]inds)

test/threading/test_threading.jl

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
using Compat
21
using ITensors
32
using Test
43
using LinearAlgebra
@@ -8,7 +7,7 @@ if isone(Threads.nthreads())
87
end
98

109
@testset "Threading" begin
11-
blas_num_threads = Compat.get_num_threads()
10+
blas_num_threads = BLAS.get_num_threads()
1211
strided_num_threads = ITensors.NDTensors.Strided.get_num_threads()
1312

1413
BLAS.set_num_threads(1)

0 commit comments

Comments
 (0)