Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "ITensorBase"
uuid = "4795dd04-0d67-49bb-8f44-b89c448a1dc7"
authors = ["ITensor developers <[email protected]> and contributors"]
version = "0.4.1"
version = "0.4.2"

[deps]
Accessors = "7d9f7c33-5ae7-4f3b-8dc6-eff91059b697"
Expand All @@ -24,7 +24,7 @@ DerivableInterfaces = "0.5"
FillArrays = "1.13"
LinearAlgebra = "1.10"
MapBroadcast = "0.1.5"
NamedDimsArrays = "0.10"
NamedDimsArrays = "0.11.1"
Random = "1.10"
TensorAlgebra = "0.3, 0.4, 0.5, 0.6"
UnallocatedArrays = "0.1.1"
Expand Down
2 changes: 1 addition & 1 deletion docs/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ ITensorBase = {path = ".."}
Documenter = "1"
ITensorBase = "0.4"
Literate = "2"
NamedDimsArrays = "0.10"
NamedDimsArrays = "0.11"
2 changes: 1 addition & 1 deletion examples/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ ITensorBase = {path = ".."}
[compat]
ITensorBase = "0.4"
LinearAlgebra = "1.10"
NamedDimsArrays = "0.10"
NamedDimsArrays = "0.11"
16 changes: 4 additions & 12 deletions src/abstractitensor.jl
Original file line number Diff line number Diff line change
@@ -1,16 +1,10 @@
using MapBroadcast: Mapped
using NamedDimsArrays:
NamedDimsArrays,
AbstractNamedDimsArray,
NamedDimsArray,
dename,
dimnames,
inds,
mapinds
using NamedDimsArrays: NamedDimsArrays, AbstractNamedDimsArray, NamedDimsArray, dename,
dimnames, inds, mapinds

abstract type AbstractITensor <: AbstractNamedDimsArray{Any, Any} end

NamedDimsArrays.nameddimstype(::Type{<:IndexName}) = ITensor
NamedDimsArrays.nameddimsconstructor(::Type{<:IndexName}) = ITensor

Base.ndims(::Type{<:AbstractITensor}) = Any

Expand All @@ -23,9 +17,7 @@ using UnspecifiedTypes: UnspecifiedZero
function specify_eltype(a::Zeros{UnspecifiedZero}, elt::Type)
return Zeros{elt}(axes(a))
end
function specify_eltype(a::AbstractArray, elt::Type)
return a
end
specify_eltype(a::AbstractArray, elt::Type) = a

# TODO: Use `adapt` to reach down into the storage.
function specify_eltype!(a::AbstractITensor, elt::Type)
Expand Down
2 changes: 1 addition & 1 deletion test/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ ITensorBase = {path = ".."}
Aqua = "0.8.9"
ITensorBase = "0.4"
LinearAlgebra = "1.10"
NamedDimsArrays = "0.10"
NamedDimsArrays = "0.11"
SafeTestsets = "0.1"
Suppressor = "0.2"
Test = "1.10"
Loading